Skip to content

Wild bootstrap

Wild bootstrap regression inference uses mean-zero, unit-variance multipliers to retain residual scales. Compare pooled resampling, leverage adjustments and null-imposed tests.

The wild bootstrap is a bootstrap method that generates regression errors by multiplying each observation's residual by a random weight with mean zero and variance one. It keeps the regressors fixed and leaves each residual's scale attached to its own observation. This makes it useful for inference on a factor loading or other regression coefficient when heteroskedasticity makes a pooled residual distribution inappropriate.

The basic version here assumes independent, mean-zero errors conditional on the fixed design matrix. It allows unequal variances across observations. That distinction matters for finance: a cross-sectional return regression with different residual risks is a different resampling problem from a daily-return regression with serially correlated errors.

Multiply in place, rather than shuffle

Write a linear model as yi=xi′β+uiy_i=\mathbf{x}_i'\boldsymbol\beta+u_i. After fitting it, choose residual scales aia_i and generate

yi∗=xi′β0∗+ui∗,ui∗=aivi.y_i^*=\mathbf{x}_i'\boldsymbol\beta_0^*+u_i^*, \qquad u_i^*=a_i v_i.

Here β0∗\boldsymbol\beta_0^* is the coefficient vector used to generate the bootstrap data; its choice depends on whether the task is estimation or testing a restriction. The multipliers viv_i are independent of the observed data and of one another, with

E[vi]=0,E[vi2]=1.\mathbb{E}[v_i]=0, \qquad \mathbb{E}[v_i^2]=1.
A simple choice is a Rademacher multiplier: vi=+1v_i=+1 or −1-1, each with probability 1/21/2. Let E∗\mathbb{E}^* and Var∗\text{Var}^* mean expectation and variance over bootstrap draws, conditional on the observed data. Since each aia_i is then fixed,
E∗[ui∗]=0,Var∗(ui∗)=ai2,Cov∗(ui∗,uj∗)=0(i≠j).\mathbb{E}^*[u_i^*]=0, \qquad \text{Var}^*(u_i^*)=a_i^2, \qquad \text{Cov}^*(u_i^*,u_j^*)=0\quad(i\ne j).
These are exact properties of the multiplier construction. They do not say that an individual squared residual equals the true conditional error variance. The justification concerns the distribution of the statistic being bootstrapped under suitable model and regularity conditions. Davidson and Flachaire, §2 develop this fixed-design construction.
An iid residual bootstrap, by contrast, draws errors with replacement from a common pool of residuals, usually after centering and any chosen scaling. Every row receives the same empirical error distribution. That loses the connection between an observation's regressors and its residual scale when the errors are heteroskedastic. MacKinnon, §3.4 explains why the wild construction is useful in this setting.

Four residuals show the difference

Suppose a fictional fixed-design regression supplies the residuals

u^=(−1, 1, −2, 2)\hat{\mathbf u}=(-1,\ 1,\ -2,\ 2)

in percentage points. Use raw residuals as aia_i for this illustration only. With independent Rademacher multipliers, rows 1 and 2 can each receive an error of −1-1 or +1+1; rows 3 and 4 can each receive −2-2 or +2+2. Their conditional variances are therefore

(1, 1, 4, 4)percentage points squared.(1,\ 1,\ 4,\ 4)\quad\text{percentage points squared}.

There are 24=162^4=16 equally likely multiplier vectors. Enumerating all of them gives mean zero at every row and zero covariance between different rows. One possible multiplier vector, (+1,−1,−1,+1)(+1,-1,-1,+1), produces (−1,−1,2,2)(-1,-1,2,2). Its errors need not sum to zero: mean zero is a statement about the distribution of each bootstrap error, not about the average in every realised draw.

Fictional raw residuals are −1, 1, −2 and 2 percentage points. Wild errors take values ±1 at rows 1–2 and ±2 at rows 3–4, giving conditional variances 1, 1, 4 and 4 pp². Pooled iid residual resampling gives variance 2.5 pp² at every row.
Fictional raw residuals are −1, 1, −2 and 2 percentage points. Wild errors take values ±1 at rows 1–2 and ±2 at rows 3–4, giving conditional variances 1, 1, 4 and 4 pp². Pooled iid residual resampling gives variance 2.5 pp² at every row.
Figure: Exact conditional multiplier arithmetic for four fictional residuals. The dashed line is the pooled empirical variance, not a degrees-of-freedom-adjusted regression variance estimate.

The pooled residuals already have mean zero. Drawing uniformly from {−1,1,−2,2}\{-1,1,-2,2\} would instead give every row variance

(−1)2+12+(−2)2+224=2.5.\frac{(-1)^2+1^2+(-2)^2+2^2}{4}=2.5.

Both constructions are centered here; only the wild construction retains the row-specific squared scales. This example checks the resampling mechanism, not the accuracy of a four-observation regression test.

Residual scales and leverage still need care

Raw ordinary least squares residuals are fitted errors, not observed disturbances. Fitting shrinks their spread, especially at observations with high statistical leverage. For the design matrix used in the residual fit, let hih_i be the corresponding hat-matrix diagonal. Common scale adjustments are
ai=u^i1−hi(HC2-style),ai=u^i1−hi(HC3-style).a_i=\frac{\hat u_i}{\sqrt{1-h_i}}\quad\text{(HC2-style)}, \qquad a_i=\frac{\hat u_i}{1-h_i}\quad\text{(HC3-style)}.
These formulas require hi<1h_i<1. They are choices for generating bootstrap errors; the covariance estimator used to studentize the statistic is a separate choice. Neither adjustment guarantees reliable inference when a small number of observations dominate the fit. MacKinnon's comparison of wild-bootstrap variants distinguishes residual transformations and restricted versus unrestricted fits.

An intercept makes unadjusted OLS residuals sum to zero, but leverage adjustment can change that sum. Mean-zero multipliers still center each bootstrap error conditionally. Subtracting the realised mean of every vector of generated errors is a different construction: it introduces dependence and changes the covariance identities above.

Build a test under the null

For a scalar restriction H0:βj=b0H_0:\beta_j=b_0, one coherent null-imposed design is:

  1. Fit the unrestricted model and calculate the observed t=(β^j−b0)/se^HC3(β^j)t=(\hat\beta_j-b_0)/\widehat{\text{se}}_{\mathrm{HC3}}(\hat\beta_j).
  2. Fit the model subject to H0H_0, obtaining β~\tilde{\boldsymbol\beta} and restricted residuals u~i\tilde u_i. For an HC2-style generator, use ai=u~i/1−h~ia_i=\tilde u_i/\sqrt{1-\tilde h_i}, where h~i\tilde h_i comes from the restricted residual fit.
  3. Generate yi∗=xi′β~+aiviy_i^*=\mathbf{x}_i'\tilde{\boldsymbol\beta}+a_i v_i, refit the unrestricted model to each generated sample, and recompute its HC3 standard error.
  4. Form t∗=(β^j∗−b0)/se^HC3∗(β^j∗)t^*=(\hat\beta_j^*-b_0)/\widehat{\text{se}}_{\mathrm{HC3}}^*(\hat\beta_j^*). Estimate the two-sided bootstrap tail probability by the fraction of draws with ∣t∗∣≥∣t∣|t^*|\ge |t|.
The null holds in the generating model's conditional mean, not in every refitted coefficient. Studentizing each draw lets its estimated uncertainty enter the comparison. Generating around an unrestricted estimate and comparing uncentered coefficients to zero would answer a different question. The fwildclusterboot methodological documentation separates these design choices and the non-clustered multiplier case. This is an illustrative specification, not a universally optimal combination of adjustments.
Independent observation-level weights do not preserve serial correlation: their conditional cross-covariances are zero. Wild cluster methods use shared multipliers within clusters; dependent wild methods use appropriately dependent multipliers. They require their own assumptions and inference design. A block bootstrap is another approach to dependent data. Calling any of these simply “wild” does not make their dependence assumptions interchangeable.
For the underlying covariance problem, SelfMadeQuant's Heteroscedasticity: White's Test, Robust Standard Errors, and Weighted Least Squares explains robust regression uncertainty and why HC does not cover serial correlation. The public page is a preview; the full lesson requires membership.

Sources

Last updated
  • bootstrap
  • heteroskedasticity
  • regression
  • residuals
  • statistical inference
← Back to the glossaryBack to top ↑