mb.boot {svars} | R Documentation |
Moving block bootstrap for IRFs of identified SVARs
Description
Calculating confidence bands for impulse response via moving block bootstrap
Usage
mb.boot(
x,
design = "recursive",
b.length = 15,
n.ahead = 20,
nboot = 500,
nc = 1,
dd = NULL,
signrest = NULL,
signcheck = TRUE,
itermax = 300,
steptol = 200,
iter2 = 50
)
Arguments
x |
SVAR object of class "svars" |
design |
character. If design="fixed", a fixed design bootstrap is performed. If design="recursive", a recursive design bootstrap is performed. |
b.length |
Integer. Length of each block |
n.ahead |
Integer specifying the steps |
nboot |
Integer. Number of bootstrap iterations |
nc |
Integer. Number of processor cores |
dd |
Object of class 'indepTestDist'. A simulated independent sample of the same size as the data. If not supplied, it will be calculated by the function |
signrest |
A list with vectors containing 1 and -1, e.g. c(1,-1,1), indicating a sign pattern of specific shocks to be tested with the help of the bootstrap samples. |
signcheck |
Boolean. Whether the sign pattern should be checked for each bootstrap iteration. Note that this procedure is computationally extremely demanding for high dimensional VARs, since the number of possible permutations of B is K!, where K is the number of variables in the VAR. |
itermax |
Integer. Maximum number of iterations for DEoptim |
steptol |
Numeric. Tolerance for steps without improvement for DEoptim |
iter2 |
Integer. Number of iterations for the second optimization |
Value
A list of class "sboot" with elements
true |
Point estimate of impulse response functions |
bootstrap |
List of length "nboot" holding bootstrap impulse response functions |
SE |
Bootstrapped standard errors of estimated covariance decomposition (only if "x" has method "Cramer von-Mises", or "Distance covariances") |
nboot |
Number of bootstrap iterations |
design |
character. Whether a fixed design or recursive design bootstrap is performed |
b_length |
Length of each block |
point_estimate |
Point estimate of covariance decomposition |
boot_mean |
Mean of bootstrapped covariance decompositions |
signrest |
Evaluated sign pattern |
sign_complete |
Frequency of appearance of the complete sign pattern in all bootstrapped covariance decompositions |
sign_part |
Frequency of bootstrapped covariance decompositions which conform the complete predetermined sign pattern. If signrest=NULL, the frequency of bootstrapped covariance decompositions that hold the same sign pattern as the point estimate is provided. |
sign_part |
Frequency of single shocks in all bootstrapped covariance decompositions which accord to a specific predetermined sign pattern |
cov_bs |
Covariance matrix of bootstrapped parameter in impact relations matrix |
method |
Used bootstrap method |
VAR |
Estimated input VAR object |
References
Brueggemann, R., Jentsch, C., and Trenkler, C., 2016. Inference in VARs with conditional heteroskedasticity of unknown form. Journal of Econometrics 191, 69-85.
Herwartz, H., 2017. Hodges Lehmann detection of structural shocks -
An analysis of macroeconomic dynamics in the Euro Area, Oxford Bulletin of Economics and Statistics.
See Also
id.cvm
, id.dc
, id.ngml
, id.garch
, id.cv
or id.st
Examples
# data contains quarterly observations from 1965Q1 to 2008Q3
# x = output gap
# pi = inflation
# i = interest rates
set.seed(23211)
v1 <- vars::VAR(USA, lag.max = 10, ic = "AIC" )
x1 <- id.dc(v1)
summary(x1)
# impulse response analysis with confidence bands
# Checking how often theory based impact relations appear
signrest <- list(demand = c(1,1,1), supply = c(-1,1,1), money = c(-1,-1,1))
bb <- mb.boot(x1, b.length = 15, nboot = 500, n.ahead = 30, nc = 1, signrest = signrest)
summary(bb)
# Plotting IRFs with confidance bands
plot(bb, lowerq = 0.16, upperq = 0.84)
# With different confidence levels
plot(bb, lowerq = c(0.05, 0.1, 0.16), upperq = c(0.95, 0.9, 0.84))
# Halls percentile
plot(bb, lowerq = 0.16, upperq = 0.84, percentile = 'hall')
# Bonferroni bands
plot(bb, lowerq = 0.16, upperq = 0.84, percentile = 'bonferroni')