Computes the time-varying impulse response coefficients of an object of class tvvar, obtained with function tvVAR for n.ahead steps.

tvIRF(
  x,
  impulse = NULL,
  response = NULL,
  n.ahead = 10,
  ortho = TRUE,
  ortho.cov = c("tv", "const"),
  bw.cov = NULL,
  cumulative = FALSE,
  ...
)

Arguments

x

An object of class tvvar.

impulse

A character vector of the impulses, default is all variables.

response

A character vector of the responses, default is all variables.

n.ahead

Integer specifying the steps.

ortho

Logical, if TRUE (the default) the orthogonalised IRF is computed.

ortho.cov

A character indicating if the covariance matrix for the orthogonal tvIRF should be estimated as a constant or time varying. Either 'const' or 'tv' (default). This parameter is used only when ortho = TRUE.

bw.cov

A scalar (optional) with the bandwidth to estimate the errors variance-covariance matrix. If left NULL, it is estimated.

cumulative

Logical, if TRUE the cumulated impulse response coefficients are computed. Default is FALSE.

...

Other parameters passed to specific methods.

Value

tvIRF returns and object of class tvirf with the following components:

irf

A list of length the number of impulse variable(s). Each element of the list is an array of dim = c(obs x number of response variables x n.ahead).

Lower

A list of length the number of impulse variable(s), containing the lower confidence line, if calculated.

Upper

A list of length the number of impulse variable(s), containing the upper confidence line, if calculated.

response

A character, a number of a vector with the names or positions of the response(s) variable(s).

impulse

A character, a number of a vector with the names or positions of the impulse(s) variable(s).

x

A object of class tvvar

.
n.ahead

Number of ahead impulse response functions.

ortho

Logical, orthogonal or not impuluse response function.

ortho.cov

Character, either 'const' or 'tv' (default). This parameter is used when the orthogonal TVIRF is calculated. The default is using an error time-varying variance-covariance.

bw.cov

A scalar with the bandwidth to estimate the errors variance-covariance matrix. If NULL, it is calculated by cross-validation.

cumulative

Logical, if TRUE the cumulated impulse response coefficients are computed. Default is FALSE.

See also

Examples

if (FALSE) { ##Inflation rate, unemployment rate and treasury bill ##interest rate for the US as in Primiceri (2005). data(usmacro, package = "bvarsv") TVVAR <- tvVAR(usmacro, p = 4, type = "const") ##Estimate a the tvIRF with time-varying covariance function TVIRF <- tvIRF(TVVAR) ##Cumulative impulse response function TVIRF2 <- tvIRF(TVVAR, cumulative = TRUE) }