big_b_and_M: big_b_and_M This function returns the extended b and M...

View source: R/big_b_and_M.r

big_b_and_MR Documentation

big_b_and_M This function returns the extended b and M matrices as in APR

Description

big_b_and_M This function returns the extended b and M matrices as in APR

Usage

big_b_and_M(h, n_draws, n_var, n_p, data_ = NULL, matrices = NULL)

Arguments

h

forecast horison

n_draws

Number of draws

n_var

Number of variables

n_p

Number of lags

data_

(matrix optional) The data, stacking Y over X (data and laggs) – columns are observations (default taken from matrices$Z) NB: this is not necessarily the same as the data used to estimate the model If run counterfactuals in previoius historical period (ie not forecast) must pass the data up to previous period relative to counterfactual

matrices

Optional matrices object from gen_mats() (default taken from calling environment)

Value

the big_b and big_M matrices of mean and IRF

Examples

## Not run: 
# Example usage for creating extended matrices
result <- big_b_and_M(h = 4, n_draws = 1000, n_var = 3, n_p = 2,
                      matrices = matrices)
big_b <- result[[1]]
big_M <- result[[2]]

## End(Not run)

APRScenario documentation built on Dec. 22, 2025, 1:06 a.m.