irf_ala_arias: Calculate structural IRFs

View source: R/irf_ala_arias.R

irf_ala_ariasR Documentation

Calculate structural IRFs

Description

This function calculates orthogonal structural IRFs using linear algebra primitives. Returns a n x (n*horizon + 1*LR) matrix, columns of which represent shocks, as ordered in model, and rows represent variables for each period of IRF, as ordered in model, written cyclically. First n rows represent contemporaneous relations of variables, next n rows represent same relations for h=1, and so on.

Usage

irf_ala_arias(B, Sigma, p, n, horizon, LR = FALSE, Q = NULL)

Arguments

B

B = A+ * A0^(-1) — matrix of reduced parameters in form B = (c, B1, ..., Bp). If there are no constants in model, just add extra zero column to the beginning of B.

Sigma

Variance-covariance matrix of error term.

p

Order of model.

n

Number of variables/shocks, including unidentified ones.

horizon

Number of periods to calculate IRF for. -1 => no short-run IRFs.

LR

Boolean variable, whether to calculate long-run IRF (default=FALSE). Note if LR is TRUE, long-run IRFs. are added to the bottom of matrix returned (the last n rows are long-run IRFs).

Q

(optional) Estimated orthonormal matrix used for structural IRF (default=NULL).

Value

A matrix of columnwise-stacked structural IRFs, columns = shocks (as ordered in model), rows = variables*horizon.


roootra/ZerosignR documentation built on May 23, 2022, 2:06 p.m.