irf.linear {tsDyn} | R Documentation |
Impulse response function
Description
Compute the impulse response coefficients (IRF) of a VAR(p) (or transformed VECM to VAR(p)) for
n.ahead
steps.
For TVECM and TVAR model, argument regime
offers regime-specific IRF.
Usage
## S3 method for class 'linear'
irf(
x,
impulse = NULL,
response = NULL,
n.ahead = 10,
ortho = TRUE,
cumulative = FALSE,
boot = TRUE,
ci = 0.95,
runs = 100,
seed = NULL,
...
)
## S3 method for class 'setar'
irf(
x,
impulse = NULL,
response = NULL,
n.ahead = 10,
ortho = TRUE,
cumulative = FALSE,
boot = TRUE,
ci = 0.95,
runs = 100,
seed = NULL,
regime = c("L", "M", "H"),
...
)
## S3 method for class 'ar'
irf(
x,
impulse = NULL,
response = NULL,
n.ahead = 10,
ortho = TRUE,
cumulative = FALSE,
boot = TRUE,
ci = 0.95,
runs = 100,
seed = NULL,
...
)
## S3 method for class 'VAR'
irf(
x,
impulse = NULL,
response = NULL,
n.ahead = 10,
ortho = TRUE,
cumulative = FALSE,
boot = TRUE,
ci = 0.95,
runs = 100,
seed = NULL,
...
)
## S3 method for class 'VECM'
irf(
x,
impulse = NULL,
response = NULL,
n.ahead = 10,
ortho = TRUE,
cumulative = FALSE,
boot = TRUE,
ci = 0.95,
runs = 100,
seed = NULL,
...
)
## S3 method for class 'TVAR'
irf(
x,
impulse = NULL,
response = NULL,
n.ahead = 10,
ortho = TRUE,
cumulative = FALSE,
boot = TRUE,
ci = 0.95,
runs = 100,
seed = NULL,
regime = c("L", "M", "H"),
...
)
## S3 method for class 'TVECM'
irf(
x,
impulse = NULL,
response = NULL,
n.ahead = 10,
ortho = TRUE,
cumulative = FALSE,
boot = TRUE,
ci = 0.95,
runs = 100,
seed = NULL,
regime = c("L", "M", "H"),
...
)
Arguments
x |
Object of class ‘ |
impulse , response |
Not used! |
n.ahead |
Integer specifying the steps. |
ortho |
Logical, if |
cumulative |
Logical, if |
boot , ci , runs , seed |
Arguments for the bootstrap, see |
... |
Currently not used. |
regime |
For a setar model, which regime (L, M or H) to produce IRF for? |
Value
A list of class ‘varirf
’ see irf.varest
Author(s)
Matthieu Stigler
See Also
plot
for the plot method. lineVar
,
VECM
for the models.
Hamilton, J. (1994), Time Series Analysis, Princeton University
Press, Princeton.
Lutkepohl, H. (2006), New Introduction to Multiple Time Series Analysis, Springer, New York.
Examples
data(barry)
## For VAR
mod_var <- lineVar(barry, lag = 2)
irf(mod_var, impulse = "dolcan", response = c("dolcan", "cpiUSA", "cpiCAN"), boot =
FALSE)
## For VECM
mod_VECM <- VECM(barry, lag = 2, estim="ML", r=2)
irf(mod_VECM, impulse = "dolcan", response = c("dolcan", "cpiUSA", "cpiCAN"), boot =
FALSE)