impulseResponseVAR2: Impulse response analysis of the VAR(2) model

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

View source: R/impulseResponseVAR2.r

Description

Evaluate the impulse responses of the VAR(2) model. It assesses the effect of an innovation (error) at one time point on the variates at future time points. In the VAR(2) model this amounts evaluating a recursive relationship in \mathbf{A}_1 and \mathbf{A}_2, the matrices of lag 1 and lag 2 autoregression coefficients.

Usage

1

Arguments

A1

A matrix \mathbf{A}_1 with lag 1 autoregression parameters.

A2

A matrix \mathbf{A}_2 with lag 2 autoregression parameters.

T

Non-negative integer of length one specifying the time point at which the impulse responses is to be evaluated.

Value

A matrix with the impulse response of the innovation vector.

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.

Miok, V., Wilting, S.M., Van Wieringen, W.N. (2018), “Ridge estimation of network models from time-course omics data”, Biometrical Journal, <DOI:10.1002/bimj.201700195>.

See Also

impulseResponseVAR1, impulseResponseVARX1, ridgeVAR2.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# set dimensions (p=covariates, n=individuals, T=time points)
p <- 3; n <- 12; T <- 10

# set model parameters
SigmaE <- diag(p)/4
A1     <- createA(p, "clique", nCliques=1)
A2     <- createA(p, "hub", nHubs=1)

# generate time-varying covariates in accordance with VAR(2) process
Y <- dataVAR2(n, T, A1, A2, SigmaE)

# fit VAR(2) model
VAR2hat <- ridgeVAR2(Y, 1, 1, 1)

# impulse response analysis
impulseResponseVAR2(VAR2hat$A1, VAR2hat$A2, 10)

wvanwie/ragt2ridges documentation built on May 4, 2019, 12:03 p.m.