summary,VGMSFH-method | R Documentation |
This method provides a summary of posterior samples from a VGMSFH
object, including posterior means and credible intervals for a specified parameter field.
## S4 method for signature 'VGMSFH'
summary(object, var_idx = 1, field = "beta_samples")
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 |
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.
A data frame with columns:
mean
: Posterior mean,
lower
: Lower bound of the credible interval,
upper
: Upper bound of the credible interval.
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.