Learn R Programming

sstvars (version 1.2.1)

get_allA_yti: Compute the autoregression matrices \(A_{y,t,i}\equiv \sum_{m=1}^M\alpha_{m,t}A_{m,i}\) for all lags \(i=1,...,p\) for a single time period

Description

get_allA_yti computes the autoregression matrices \(A_{y,t,i}\equiv \sum_{m=1}^M\alpha_{m,t}A_{m,i}\), for all lags \(i=1,...,p\) for a single time period, based on the regime autoregression matrices and transition weights.

Usage

get_allA_yti(all_A, alpha_mt)

Value

Returns the 3D array containing the coefficient matrices for the given time period so that the lag \(i\) coefficient matrix \(A_{y,t,i}\)

can be obtained by choosing [, , i].

Arguments

all_A

4D array containing the coefficient matrices of all regimes so that coefficient matrix \(A_{m,i}\) can be obtained by choosing [, , i, m] (as obtained from pick_allA).

alpha_mt

an \((M \times 1)\) vector containing the time period \(t\) transition weights.

Details

This is used in simulation of the counterfactual scenarios.