irf.var {MSBVAR}R Documentation

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 coefficients.

Usage

irf.var(var.obj, nsteps, A0=t(chol(var.obj$mean.S)))

Arguments

var.obj VAR objects for a fitted VAR model from either szbvar() or mlevar
nsteps Number or steps, or the horizon over which to compute the IRFs (typically 1.5 to 2 times the lag length used in estimation
A0 Decomposition contemporaneous error covariance of a VAR, default is a Cholesky decomposition of the error covariance matrix, A0 = t(chol(var.obj$mean.S))

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.var which calls this function and simulates its multivariate posterior distribution.

Value

A list of the AR coefficients used in computing the IRF and the impulse response matrices:

B Autoregressive coefficient matrices in lag order. Note that all AR coefficient matrices for k>p are zero
mhat M x M x k impulse response matrices. mhat[,,i] are the impulses for the i'th period for the M variables.

Note

The IRF depends on the ordering of the variables and the structure of the decomposition in A0.

Author(s)

Patrick T. Brandt

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.var for Bayesian and frequentist computations of IRFs and their variances (which is what you probably really want).

Examples

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

[Package MSBVAR version 0.1 Index]