Extract or Replace Parts of a bayesianVARs_coef object
Source:R/bvar_wrapper.R
sub-.bayesianVARs_coef.Rd
Extract or replace parts of a bayesianVARs_coef
object.
Examples
# Access a subset of the usmacro_growth dataset
data <- usmacro_growth[,c("GDPC1", "CPIAUCSL", "FEDFUNDS")]
# Estimate a model
mod <- bvar(data, sv_keep = "all", quiet = TRUE)
# Extract coefficients, which are of class bayesianVARs_coef
phi <- coef(mod)
phi[1,1,1]
#> [1] 0.2644423
#> attr(,"class")
#> [1] "bayesianVARs_coef" "bayesianVARs_draws"