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, ... )
x | An object of class |
---|---|
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. |
tvIRF
returns and object of class tvirf
with the
following components:
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).
A list of length the number of impulse variable(s), containing the lower confidence line, if calculated.
A list of length the number of impulse variable(s), containing the upper confidence line, if calculated.
A character, a number of a vector with the names or positions of the response(s) variable(s).
A character, a number of a vector with the names or positions of the impulse(s) variable(s).
A object of class tvvar
Number of ahead impulse response functions.
Logical, orthogonal or not impuluse response function.
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.
A scalar with the bandwidth to estimate the errors variance-covariance matrix. If NULL, it is calculated by cross-validation.
Logical, if TRUE the cumulated impulse response coefficients are computed. Default is FALSE.
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) }