Learn R Programming

APRScenario (version 0.0.3.0)

gen_mats: gen_mats function

Description

this function returns the matrices necessary for forecasts

Usage

gen_mats(posterior = NULL, specification = NULL)

Value

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.

Arguments

posterior

Posterior estimation results (eg from BsvarSIGNs)

specification

Optional specification object (default taken from calling environment)

Examples

Run this code
# \donttest{
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)
# }

Run the code above in your browser using DataLab