View source: R/irf.ZerosignR.result.R
irf.ZerosignR.result | R Documentation |
This function calculates arbitrary-horizon structural IRFs conditinal on given set of matrices Q — orthonormal matrices that satisfy zero and sign restrictions.
## S3 method for class 'ZerosignR.result' irf(zerosignr, horizon = 0, LR = FALSE, quantil = 0.05)
zerosignr |
|
horizon |
Numeric. Horizon to calculate IRF for. 0 = only contemporaneous IRF, 1 = contemporaneous + next period after shock IRF, etc. |
LR |
Boolean. Whether to calculate long-run IRF additionally to finite-run ones. |
quantil |
Numeric. Number in (0,1), calculate IRF quantile band. |
Arias et al. (2018) show that structural shock IRF for period h can be calculated in matrix form as follows (see definitions for J and F in the original article):
Lh(A0, A+) = (A0 * J' * F^h * J)'.
The special case is for long-run IRF, which is given as:
Linf(A0, A+) = (A0' - ∑ A_l')^(-1).
In order to obtain structural IRF conditional on orthonormal matrix Q, that satisfies zero and sign restrictions, one has just multiply IRF matrix by Q:
Lh(A0, A+) * Q = Lh(A0 * Q, A+ * Q).
ZerosignR.irf
, a list containing:
struc_irfs
, 3-dim. array with IRFs. The 1-st dimension is for specific Q-matrix,
the 2-nd one is nvars*(horizon+contemporaneous+LR) — row-stacked IRFs for different
periods, starting from the earliest one, the 3-rd one is for shocks;
median_irf
, pointwise-median IRF, aggregated for Q-matrices;
quantile_irf
, IRF sample quantiles for band;
ctm_irf
, IRF from closest-to-median model, Euclidean distance;
..., auxillary constants.
struc_irfs
in returned value ZerosignR.irf
is a row-stacked IRF with columns for shocks.
Shocks' order is as in the restriction matrix from ZerosignR.result
object.
First nvars rows are for variables' contemporaneous response (order is as in underlying model),
Rows from nvars + 1 to 2*nvars are for variables' response in the period right after the shock, etc.
If LR
is TRUE
, the last nvars rows are long-run IRF.
Artur Zmanovskii. anzmanovskii@gmail.com
Arias, J.E. and Rubio-Ramirez, J. F. and Waggoner, D. F. (2018) Inference Based on Structural Vector Autoregressions Identifiied with Sign and Zero Restrictions: Theory and Applications. Econometrica, 86, 2, 685-720, https://doi.org/10.3982/ECTA14468.
zerosign_restr
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.