Learn R Programming

pvars (version 1.1.1)

sboot.pmb: Bootstrap with residual panel blocks for panel SVAR models

Description

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

Usage

sboot.pmb(
  x,
  b.dim = c(1, 1),
  n.ahead = 20,
  n.boot = 500,
  n.cores = 1,
  fix_beta = TRUE,
  deltas = cumprod((100:0)/100),
  normf = NULL,
  w = NULL,
  MG_IRF = TRUE
)

Value

A list of class 'sboot2' with elements:

true

Mean group estimate of impulse response functions.

bootstrap

List of length nboot 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'.

L.PSI_bc

List of the \(N\) estimated bias terms \(\hat{\Psi}_i\) for the individual VAR coefficients \(\hat{A}_i\) according to Kilian (1998).

pvarx

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

b.dim

Dimensions of each block.

nboot

Number of correct bootstrap iterations.

design

Character indicating that the recursive design bootstrap has been performed.

method

Used bootstrap method.

stars_t

Matrix of (\(T \times \)n.boot) integers containing the \(T\) temporal resampling draws from each bootstrap iteration.

stars_i

Matrix of (\(N \times \)n.boot) integers containing the \(N\) cross-sectional resampling draws from each bootstrap iteration.

Arguments

x

Panel VAR object of class 'pid' or 'pvarx' or a list of VAR objects that will be coerced to 'varx'. If a list x$L.PSI_bc of \(N\) bias terms are available for the \(N\) coefficient matrices \(A_i\) (such as in sboot2), the bias-corrected second-step of the bootstrap-after-bootstrap procedure by Empting et al. (2025) is performed.

b.dim

Vector of two integers. The dimensions \((b_{(t)}, b_{(i)})\) of each residual panel block for temporal and cross-sectional resampling. The default c(1, 1) specifies an \(i.i.d.\) resampling in both dimensions, c(1, FALSE) a temporal resampling, and c(FALSE, 1) a cross-sectional resampling. Integers \(> 1\) assemble blocks of consecutive residuals.

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 each bias estimate \(\hat{\Psi}_i\) 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.

w

Numeric, logical, or character vector. \(N\) numeric elements weighting the individual coefficients, or names or \(N\) logical elements selecting a subset from the individuals \(i = 1, \ldots, N\) for the MG estimation. If NULL (the default), all \(N\) individuals are included without weights.

MG_IRF

Logical. If TRUE (the default), the mean-group of individual IRF is calculated in accordance with Gambacorta et al. (2014). If FALSE, the IRF is calculated for the mean-group of individual VAR estimates.

Details

In case of heterogeneous lag-orders \(p_i\) or sample sizes \(T_i\), the initial periods are fixed in accordance with the usage of presamples. Only the \((K \times T_{min} \times N)\) array of the \(T_{min} = min(T_1,\ldots,T_N)\) last residuals is resampled.

References

Brueggemann R., Jentsch, C., and Trenkler, C. (2016): "Inference in VARs with Conditional Heteroskedasticity of Unknown Form", Journal of Econometrics, 191, pp. 69-85.

Empting, L. F. T., Maxand, S., Oeztuerk, S., and Wagner, K. (2025): "Inference in Panel SVARs with Cross-Sectional Dependence of Unknown Form".

Kapetanios, G. (2008): "A Bootstrap Procedure for Panel Data Sets with many Cross-sectional Units", The Econometrics Journal, 11, pp.377-395.

Kilian, L. (1998): "Small-Sample Confidence Intervals for Impulse Response Functions", Review of Economics and Statistics, 80, pp. 218-230.

Gambacorta L., Hofmann B., and Peersman G. (2014): "The Effectiveness of Unconventional Monetary Policy at the Zero Lower Bound: A Cross-Country Analysis", Journal of Money, Credit and Banking, 46, pp. 615-642.

See Also

For the the individual counterpart see sboot.mb.

Examples

Run this code
# \donttest{
# select minimal or full example #
is_min = TRUE
n.boot = ifelse(is_min, 5, 500)

# prepare data panel #
data("PCAP")
names_k = c("g", "k", "l", "y")  # variable names
names_i = levels(PCAP$id_i)      # country names 
L.data  = sapply(names_i, FUN=function(i) 
  ts(PCAP[PCAP$id_i==i, names_k], start=1960, end=2019, frequency=1), 
  simplify=FALSE)
R.lags = c(2, 4, 2, 3, 2, 4, 4, 2, 2, 3, 3, 3, 2, 4, 4, 2, 2, 2, 4, 2, 2, 2, 4)
names(R.lags) = names_i

# estimate, identify, and bootstrap #
R.pvar = pvarx.VAR(L.data, lags=R.lags, type="both")
R.pid  = pid.chol(R.pvar)
R.boot = sboot.pmb(R.pid, n.boot=n.boot)
summary(R.boot, idx_par="A", level=0.95)  # VAR coefficients with 95%-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.pmb(R.boot, n.boot=n.boot)
summary(R.bab, idx_par="A", level=0.95)  # VAR coefficients with 95%-confidence intervals
plot(R.bab, 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