impulseResponseVAR1: Impulse response analysis of the VAR(1) model

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/impulseResponseVAR1.r

Description

Evaluate the impulse responses of the VAR(1) model. It assesses the effect of an innovation (error) at one time point on the variates at future time points. In the VAR(1) model this amounts to studying powers of \mathbf{A}, the matrix of autoregression coefficients.

Usage

1

Arguments

A

A matrix \mathbf{A} of autoregression parameters.

T

Positive numeric of length one specifying the time points for which the impulse response is to be evaluated.

Value

Object of class matrix. Rows and columns correspond to covariates, elements to the impulse response of 'row variate' on the 'columns variate' on T time points from the current.

Author(s)

Wessel N. van Wieringen <w.vanwieringen@vumc.nl>

References

Hamilton, J. D. (1994), Time Series Analysis. Princeton: Princeton university press.

Lutkepohl, H. (2005), New Introduction to Multiple Time Series Analysis. Springer, Berlin.

See Also

ridgeVAR1.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
# set dimensions
p <- 3
n <- 4
T <- 10

# set model parameters
SigmaE <- diag(p)/4
A      <- matrix(c(-0.1, -0.3, 0.6, 0.5, -0.4, 0, 0.3, -0.5, -0.2), 
                 byrow=TRUE, ncol=3)

# generate data
Y <- dataVAR1(n, T, A, SigmaE)

# fit VAR(1) model
VAR1hat <- ridgeVAR1(Y, 1, 1)

# impulse response analysis
impulseResponseVAR1(VAR1hat$A, 10)

ragt2ridges documentation built on Jan. 28, 2020, 5:08 p.m.