Learn R Programming

pvars (version 1.1.1)

sboot.mb: Bootstrap with residual moving blocks for individual SVAR models

Description

Calculates confidence bands for impulse response functions via recursive-design bootstrap.

Usage

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
)

Value

A list of class 'sboot2' with elements:

true

Point estimate of impulse response functions.

bootstrap

List of length 'n.boot' holding bootstrap impulse response functions.

A

List for the VAR coefficients containing the matrix of point estimates 'par' and the array of bootstrap results 'sim'.

B

List for the structural impact matrix containing the matrix of point estimates 'par' and the array of bootstrap results 'sim'.

PSI_bc

Matrix of the estimated bias term \(\hat{\Psi}\) for the VAR coefficients \(\hat{A}\) according to Kilian (1998).

varx

Input VAR object of class 'varx' that has been subjected to the first-step bias-correction.

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 (\(T \times \)n.boot) integers containing the \(T\) resampling draws from each bootstrap iteration.

Arguments

x

VAR object of class 'id' or 'varx' or any other that can be coerced to 'varx', e.g. 'svars'. If a bias term x$PSI_bc is available for coefficient matrix \(A\) (such as in 'sboot2'), the bias-corrected second-step of the bootstrap-after-bootstrap procedure by Kilian (1998) is performed.

b.length

Integer. Length \(b_{(t)}\) of each residual time series block, which is often set to \(T/10\).

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 TRUE (the default), the cointegrating vectors \(\beta\) are fixed over all bootstrap iterations. Ignored in case of rank-unrestricted VAR. Use this for VECM with known \(\beta\), too. Note that \(\beta\) is fixed in vars:::.bootsvec, but not in vars:::.bootirfsvec or vars:::.bootirfvec2var.

deltas

Vector. Numeric weights \(\delta_j\) that are successively multiplied to the bias estimate \(\hat{\Psi}\) for a stationary correction. The default weights deltas = cumprod((100:0)/100) correspond to the iterative correction procedure of Step 1b in Kilian (1998). Choosing deltas = NULL deactivates the bootstrap-after-bootstrap procedure.

normf

Function. A given function that normalizes the \(K \times S\) input-matrix into an output matrix of same dimension. See the example in id.iv for the normalization of Jentsch and Lunsford (2021) that fixes the size of the impact response in the IRF.

References

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.

See Also

mb.boot, irf, and the panel counterpart sboot.pmb.

Examples

Run this code
# \donttest{
# 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))
# }

Run the code above in your browser using DataLab