Learn R Programming

MSBVAR (version 0.2.2)

irf: Impulse Response Function (IRF) Computation for a VAR

Description

Computes the impulse response function (IRF) or moving average representation (MAR) for an m-dimensional set of VAR/BVAR/B-SVAR coefficients.

Usage

irf(varobj, nsteps, A0=NULL)
irf.VAR(varobj, nsteps, A0=chol(varobj$mean.S))
irf.BVAR(varobj, nsteps, A0=chol(varobj$mean.S))
irf.BSVAR(varobj, nsteps, A0=solve(varobj$A0.mode))

Arguments

Value

A list of the AR coefficients used in computing the IRF and the impulse response matrices:B$m \times m \times nstep$ Autoregressive coefficient matrices in lag order. Note that all AR coefficient matrices for $nstep>p$ are zero.mhat$m \times m \times \times nstep$ impulse response matrices. mhat[,,i] are the impulses for the i'th period for the $m$ variables.

Details

This function should rarely be called by the user. It is a working function to compute the IRFs for a VAR model. Users will typically want to used one of the simulation functions that also compute error bands for the IRF, such as mc.irf which calls this function and simulates its multivariate posterior distribution.

References

Sims, C.A. and Tao Zha. 1999. "Error Bands for Impulse Responses." Econometrica 67(5): 1113-1156.

Hamilton, James. 1994. Time Series Analysis. Chapter 11.

See Also

See also dfev for the related decompositions of the forecast error variance, mc.irf for Bayesian and frequentist computations of IRFs and their variances (which is what you probably really want).

Examples

Run this code
data(IsraelPalestineConflict)
rf.var <- reduced.form.var(IsraelPalestineConflict, p=6)
plot(irf(rf.var, nsteps = 12))

Run the code above in your browser using DataLab