summary,VGMSFH-method {vmsae} | R Documentation |
Summarize VGMSFH Result
Description
This method provides a summary of posterior samples from a VGMSFH
object, including posterior means and credible intervals for a specified parameter field.
Usage
## S4 method for signature 'VGMSFH'
summary(object, var_idx = 1, field = "beta_samples")
Arguments
object |
An object of class |
var_idx |
Integer. The index of the variable of interest (for multivariate models). Default is |
field |
Character. The name of the slot in the |
Details
This function extracts the posterior samples for the specified variable index, and combines it with confint()
to compute credible intervals. The result is a compact summary table of central tendency and uncertainty.
Value
A data frame with columns:
-
mean
: Posterior mean, -
lower
: Lower bound of the credible interval, -
upper
: Upper bound of the credible interval.
Examples
library(vmsae)
example_model <- readRDS(system.file("example", "example_model.Rds", package = "vmsae"))
summary(example_model) # Summary of beta_samples for variable 1
summary(example_model, var_idx = 2, field = "yhat_samples")