Description Usage Arguments Value Author(s) References See Also Examples
View source: R/impulseResponseVAR1.r
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.
1 | impulseResponseVAR1(A, T)
|
A |
A |
T |
Positive |
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.
Wessel N. van Wieringen <w.vanwieringen@vumc.nl>
Hamilton, J. D. (1994), Time Series Analysis. Princeton: Princeton university press.
Lutkepohl, H. (2005), New Introduction to Multiple Time Series Analysis. Springer, Berlin.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.