Learn R Programming

tsDyn (version 11.0.4.1)

irf.linear: 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 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 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 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 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 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 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 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"), ... )

Value

A list of class ‘varirf’ see irf.varest

Arguments

x

Object of class ‘VAR’; generated by lineVar(), or object of class ‘VECM’; generated byVECM().

impulse, response

Not used!

n.ahead

Integer specifying the steps.

ortho

Logical, if TRUE (the default) the orthogonalised impulse response coefficients are computed .

cumulative

Logical, if TRUE the cumulated impulse response coefficients are computed. The default value is false.

boot, ci, runs, seed

Arguments for the bootstrap, see irf.varest

...

Currently not used.

regime

For a setar model, which regime (L, M or H) to produce IRF for?

Author

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

Run this code

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)

Run the code above in your browser using DataLab