asymptotic_var: Asymptotic variance and bias of the pvarife estimator

View source: R/asymptotic.R

asymptotic_varR Documentation

Asymptotic variance and bias of the pvarife estimator

Description

Computes the asymptotic bias and variance-covariance matrix of \hat\beta under Theorem 2.3 of Tugan (2021). These quantities are used by irf_bands to construct parametric confidence bands.

Usage

asymptotic_var(fit)

Arguments

fit

An object of class "pvarife_result" returned by pvarife.

Details

The function computes three components:

D

The Hessian D_{F,\Lambda} (Eq. A.4), which accounts for factor estimation uncertainty via a two-term formula.

Omega

The sandwich variance \Omega, accumulated unit by unit.

Bias

Two bias terms: B_\Psi (from factor loading estimation) and B_\gamma (HAC serial correction with bandwidth \bar G = \lfloor T^{1/3} \rceil).

Notes on MATLAB replication: This implementation deviates from the original Asymptotic_Distribution_of_beta.m in two places, following the paper rather than the code:

  1. B_\gamma: the MATLAB accumulation (line 189) uses only the final value of the loop variable g rather than summing over g = 1, \ldots, \bar G as in Eq. (2.56). Corrected here.

  2. \Omega: MATLAB uses \Gamma\,\mathrm{diag}(u)^2\,\Gamma^\top, which drops the within-period cross-variable terms u_{t,n} u_{t,m} present in Eq. (2.65). This function computes the per-period outer products of Eq. (2.65); in simulations this gives (weakly) better confidence-interval coverage.

Value

A list with:

bias

Bias vector for \hat\beta, of the same length as fit$beta.

variance

Asymptotic variance-covariance matrix of \hat\beta.

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")}

Examples

sim <- sim_pvarife(n_units = 30, n_time = 20, 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)
avar <- asymptotic_var(fit)
cat("Bias:", avar$bias, "\n")


pvarife documentation built on June 13, 2026, 5:06 p.m.