| sboot.mb | R Documentation |
Calculates confidence bands for impulse response functions via recursive-design bootstrap.
sboot.mb(
x,
b.length = 1,
n.ahead = 20,
n.boot = 500,
n.cores = 1,
fix_beta = TRUE,
deltas = cumprod((100:0)/100),
normf = NULL
)
x |
VAR object of class ' |
b.length |
Integer. Length |
n.ahead |
Integer. Number of periods to consider after the initial impulse, i.e. the horizon of the IRF. |
n.boot |
Integer. Number of bootstrap iterations. |
n.cores |
Integer. Number of allocated processor cores. |
fix_beta |
Logical. If |
deltas |
Vector. Numeric weights |
normf |
Function. A given function that normalizes the |
A list of class 'sboot2' with elements:
true |
Point estimate of impulse response functions. |
bootstrap |
List of length ' |
A |
List for the VAR coefficients containing
the matrix of point estimates ' |
B |
List for the structural impact matrix containing
the matrix of point estimates ' |
PSI_bc |
Matrix of the estimated bias term |
varx |
Input VAR object of class ' |
nboot |
Number of correct bootstrap iterations. |
b_length |
Length of each block. |
design |
Character indicating that the recursive design bootstrap has been performed. |
method |
Used bootstrap method. |
stars |
Matrix of ( |
Breitung, J., Brueggemann R., and Luetkepohl, H. (2004): "Structural Vector Autoregressive Modeling and Impulse Responses", in Applied Time Series Econometrics, ed. by H. Luetkepohl and M. Kraetzig, Cambridge University Press, Cambridge.
Brueggemann R., Jentsch, C., and Trenkler, C. (2016): "Inference in VARs with Conditional Heteroskedasticity of Unknown Form", Journal of Econometrics, 191, pp. 69-85.
Jentsch, C., and Lunsford, K. G. (2021): "Asymptotically Valid Bootstrap Inference for Proxy SVARs", Journal of Business and Economic Statistics, 40, pp. 1876-1891.
Kilian, L. (1998): "Small-Sample Confidence Intervals for Impulse Response Functions", Review of Economics and Statistics, 80, pp. 218-230.
Luetkepohl, H. (2005): New Introduction to Multiple Time Series Analysis, Springer, 2nd ed.
mb.boot, irf,
and the panel counterpart sboot.pmb.
# select minimal or full example #
is_min = TRUE
n.boot = ifelse(is_min, 5, 500)
# use 'b.length=1' to conduct basic "vars" bootstraps #
set.seed(23211)
data("Canada")
R.vars = vars::VAR(Canada, p=2, type="const")
R.svar = svars::id.chol(R.vars)
R.boot = sboot.mb(R.svar, b.length=1, n.boot=n.boot, n.ahead=30, n.cores=1)
summary(R.boot, idx_par="A", level=0.9) # VAR coefficients with 90%-confidence intervals
plot(R.boot, lowerq = c(0.05, 0.1, 0.16), upperq = c(0.95, 0.9, 0.84))
# second step of bootstrap-after-bootstrap #
R.bab = sboot.mb(R.boot, b.length=1, n.boot=n.boot, n.ahead=30, n.cores=1)
summary(R.bab, idx_par="A", level=0.9) # VAR coefficients with 90%-confidence intervals
plot(R.bab, lowerq = c(0.05, 0.1, 0.16), upperq = c(0.95, 0.9, 0.84))
# conduct bootstraps for Blanchard-Quah type SVAR from "vars" #
set.seed(23211)
data("Canada")
R.vars = vars::VAR(Canada, p=2, type="const")
R.svar = vars::BQ(R.vars)
R.boot = sboot.mb(R.svar, b.length=1, n.boot=n.boot, n.ahead=30, n.cores=1)
summary(R.boot, idx_par="B", level=0.9) # impact matrix with 90%-confidence intervals
plot(R.boot, lowerq = c(0.05, 0.1), upperq = c(0.95, 0.9), cumulative=2:3)
# impulse responses of the second and third variable are accumulated
# set 'args_id' to CvM defaults of "svars" bootstraps #
set.seed(23211)
data("USA")
R.vars = vars::VAR(USA, lag.max=10, ic="AIC")
R.cob = copula::indepTestSim(R.vars$obs, R.vars$K, verbose=FALSE)
R.svar = svars::id.cvm(R.vars, dd=R.cob)
R.varx = as.varx(R.svar, dd=R.cob, itermax=300, steptol=200, iter2=50)
R.boot = sboot.mb(R.varx, b.length=15, n.boot=n.boot, n.ahead=30, n.cores=1)
plot(R.boot, lowerq = c(0.05, 0.1, 0.16), upperq = c(0.95, 0.9, 0.84))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.