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 VGMSFH, containing posterior samples from the model.

var_idx

Integer. The index of the variable of interest (for multivariate models). Default is 1.

field

Character. The name of the slot in the VGMSFH object to summarize (e.g., "beta_samples", "phi_samples", "yhat_samples"). Default is "beta_samples".

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:

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")


[Package vmsae version 0.1.1 Index]