irf_bands: Parametric confidence bands for impulse response functions

View source: R/confidence_bands.R

irf_bandsR Documentation

Parametric confidence bands for impulse response functions

Description

Constructs confidence bands for structural impulse responses by drawing from the joint asymptotic distribution of the estimator and the common component (Theorem 2.3 of Tugan 2021). This is a parametric simulation, not a residual bootstrap.

Usage

irf_bands(
  fit,
  n_periods,
  shock = 1L,
  diff_vars = integer(0),
  identification = c("short_run", "long_run"),
  n_draw = 500L,
  level = 0.95,
  seed = NULL
)

Arguments

fit

An object of class "pvarife_result".

n_periods

Positive integer. Number of IRF horizons.

shock

Positive integer. Index of the structural shock (default 1).

diff_vars

Integer vector. Variables to cumulate (default none).

identification

Character. "short_run" (default) or "long_run". Passed to compute_irf for each draw. The median IRF returned is implicitly bias-corrected regardless of this choice (draws are centred on \hat\beta - \hat b).

n_draw

Positive integer. Number of simulation draws (default 500).

level

Numeric in (0, 1). Confidence level (default 0.95).

seed

Optional integer seed for reproducibility.

Details

For each of the n_draw repetitions, the function:

  1. Draws \beta^{(b)} \sim N(\hat\beta - \hat b, \hat V) where \hat b and \hat V are the estimated bias and variance from asymptotic_var.

  2. Draws the common component \tilde C_{i,t,k} from a normal with mean \hat F_t \hat\lambda_i and standard deviation

    \sqrt{\hat\Xi^*_{i,t,k} / I + \hat\Xi^{**}_{i,t,k} / T},

    capturing cross-sectional and time-series uncertainty in factor estimation.

  3. Computes the IRF at (\beta^{(b)}, \tilde C^{(b)}).

The median and the (1-\mathrm{level})/2 and (1+\mathrm{level})/2 quantiles across draws give the point estimate and confidence bands.

Value

An object of class "pvarife_bands" with components:

irf

Point estimate (median across draws, bias-corrected), K \times n\_periods.

lower

Lower confidence bound, K \times n\_periods.

upper

Upper confidence bound, K \times n\_periods.

level

The confidence level used.

method

"asymptotic".

References

Tugan, M. (2021). Panel VAR models with interactive fixed effects. Econometrics Journal, 24, 225–246. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1093/ectj/utaa021")}

See Also

bootstrap_irf_bands, compute_irf

Examples

sim   <- sim_pvarife(n_units = 20, n_time = 15, n_vars = 2,
                     n_lags = 1, n_factors = 1, seed = 1)
fit   <- pvarife(sim$y, n_lags = 1, n_factors = 1, n_out = 5, n_in = 3)
bands <- irf_bands(fit, n_periods = 6, n_draw = 100, seed = 42)
plot(bands)


pvarife documentation built on June 11, 2026, 5:08 p.m.