n.ahead steps.## S3 method for class 'varest':
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 'svarest':
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 'vec2var':
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 'svecest':
irf(x, impulse = NULL, response = NULL, n.ahead = 10,
ortho = TRUE, cumulative = FALSE, boot = TRUE, ci = 0.95,
runs = 100, seed = NULL, ...)varestsvarestvec2varTRUE (the default) the orthogonalised impulse
response coefficients are computed (only for objects of class
varestTRUE the cumulated
impulse response coefficients are computed. The default value is false.TRUE (the default) bootstrapped error
bands for the imuplse response coefficients are computed.rng of the
bootstrap.varirfboot = TRUE, a list with matrices for each of
the impulse variables containing the lower bands.boot = TRUE, a list with matrices for each of
the impulse variables containing the upper bands.TRUE, orthogonalised impulse reponses
have been computed.TRUE, cumulated impulse reponses
have been computed.TRUE bootstrapped error bands have been
computed.class(x)n.ahead steps
are computed by utilising either the function boot = TRUE (the default), confidence
bands for a given width specified by ci are derived from
runs bootstrap. Hereby, it is at the users leisure to set a
seed for the random number generator.
The standard percentile interval is defined as:
$$CI_s = [s_{\alpha/2}^*, s_{1 - \alpha/2}^*] \quad ,$$
with $s_{\alpha/2}^*$ and $s_{1 - \alpha/2}^*$ are the
$\alpha/2$ and $1 - \alpha/2$ quantiles of the bootstrap
distribution of $\Psi^*$ or $\Phi^*$ depending whether
ortho = TRUE. In case cumulative = TRUE, the confidence
bands are calculated from the cumulated impulse response
coefficients.VAR, SVAR, SVAR2,
vec2var, SVEC, Phi,
Psi, plotdata(Canada)
## For VAR
var.2c <- VAR(Canada, p = 2, type = "const")
irf(var.2c, impulse = "e", response = c("prod", "rw", "U"), boot =
FALSE)
## For SVAR
amat <- diag(4)
diag(amat) <- NA
svar.a <- SVAR(var.2c, Amat = amat)
irf(svar.a, impulse = "e", response = c("prod", "rw", "U"), boot =
FALSE)Run the code above in your browser using DataLab