The MA representation y_t = sum_h Phi_h u_{t-h} is built from the
recursion Phi_0 = I, Phi_h = sum_{j=1}^{min(h,p)} A_j Phi_{h-j}, and the
shocks are orthogonalised by the lower Cholesky factor P of Sigma_u,
Theta_h = Phi_h P. Column shock_var of Theta_h is the response
to a one-standard-deviation shock in that variable.
Usage
Irfun(coef, sigma_u, horizon = 20, shock_var = 0)
Arguments
- coef
m by (1 + m p) coefficient matrix, row = equation, columns
= [intercept, A_1 row, ..., A_p row] – the layout Varest
returns.
- sigma_u
m by m residual covariance.
- horizon
Periods ahead.
- shock_var
0-based index of the shocked variable.
Value
List with irf, Phi, chol, horizon,
shock_var.
Details
R mirror of morie.fn.irfun; the Python arm carries the primary
documentation.
References
Lutkepohl, H. (2005). New Introduction to Multiple Time
Series Analysis. Springer, Ch. 2.3. doi:10.1007/978-3-540-27752-1.
Sims, C.A. (1980). Econometrica 48(1):1-48. doi:10.2307/1912017.
Examples
Irfun(matrix(c(0, 0.5, 0.1, 0, 0.2, 0.4), 2, 3), diag(2), 3)$irf
#> [,1] [,2]
#> [1,] 1.000 0
#> [2,] 0.100 0
#> [3,] 0.010 0
#> [4,] 0.001 0