| gen_mats | R Documentation |
this function returns the matrices necessary for forecasts
gen_mats(posterior = NULL, specification = NULL, max_cores = 1)
posterior |
Posterior estimation results (eg from BsvarSIGNs) |
specification |
Optional specification object (default taken from calling environment) |
max_cores |
maximum number of cores to use for parallel processing (default: 1 for Windows compatibility) |
Returns all objects necessary for scenario analysis (e.g., IRF matrix),
including: M, M_inv, M_list, B, B_list,
n_p, n_var, Y, X, and Z.
library(APRScenario)
data(NKdata)
# Minimal example with a toy specification
spec <- bsvarSIGNs::specify_bsvarSIGN$new(as.matrix(NKdata[,2:4]), p = 1)
est <- bsvars::estimate(spec, S = 10) # Use small S for fast test
gen_mats(posterior = est, specification = spec)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.