- Introduced by
- Wu (1986); refined by Davidson & Flachaire (2008)
- Year
- 1986
- Type
- Resampling-based regression inference
What does it do?
The wild bootstrap is a resampling method for inference in regression models whose errors may have non-constant variance.
It is closely related to the residual-resampling methods studied by Wu (1986), and Davidson and Flachaire (2008) give a detailed treatment of its use in econometric inference. It builds a bootstrap distribution by multiplying each fitted residual by a random sign and refitting the model, which allows standard errors and confidence intervals to be obtained without assuming constant error variance.
The intuition behind the method
The ordinary bootstrap treats observations as interchangeable, which assumes every observation carries a similar amount of noise. That assumption fails when some observations are noisier than others. The wild bootstrap keeps each observation tied to its own residual and flips that residual's sign at random. Repeating this many times shows how much the coefficients could vary, observation by observation, even when the spread of the errors differs across the data.
History
The wild bootstrap is closely related to residual-resampling methods. Wu (1986), in "Jackknife, Bootstrap and Other Resampling Methods in Regression Analysis", proposed a general method for resampling residuals that gives bias-robust variance estimators, and this residual-based approach is the context in which the wild bootstrap is usually discussed. Davidson and Flachaire (2008), in "The Wild Bootstrap, Tamed at Last", give a detailed treatment of the method for econometric inference.
When to use it
Choose the wild bootstrap when the outcome is continuous, a regression has already been fitted (for example on cross-sectional or panel data), and the error variance may differ across observations, as indicated by residual diagnostics or by knowledge of the data. It is also relevant when observations are grouped and standard errors that ignore the grouping are suspect; in that case the cluster variant is the appropriate form. Do not use it when no regression model is being estimated, when the outcome is not continuous, or when the sample is very small, because the residual rescaling then gives unreliable approximations. There is no established minimum sample size for this method; with small samples, results should be interpreted with caution and checked with diagnostics or alternative methods.
Limitations and considerations
- It is an inference procedure layered on a fitted regression; it does not estimate the coefficients by itself and inherits any misspecification of the model.
- Its approximation depends on the residuals being reasonable stand-ins for the errors, which is weaker in small samples.
- The per-observation sign flip does not by itself account for within-cluster correlation, so grouped data need the cluster version.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Produces standard errors and confidence intervals from a fitted regression that remain valid when the error variance is not constant, where naive OLS standard errors can be misleading.
- Keeps each residual attached to its own observation, so the observation-specific variance pattern is carried into every resampled outcome.
- Works directly from the residuals of the fitted model and does not require the errors to be normally distributed.
Applications
- Heteroscedasticity-robust inference for regression coefficients on cross-sectional and panel data.
- Wild cluster bootstrap for studies with grouped observations, particularly when the number of clusters is small.
- Constructing confidence intervals and hypothesis tests when the error variance is non-constant or its form is unknown.
How it works
How it works
Consider a regression in which the outcome y equals Xβ plus an error term whose variance may differ across observations (heteroscedasticity). The coefficient estimates β̂ and the residuals ε̂ = y − Xβ̂ are computed once from the original data.
Formula
y = X\beta + \varepsilon, \quad \mathrm{Var}(\varepsilon_i) = \sigma_i^2For each bootstrap replicate, a new outcome y* is formed by adding each residual, multiplied by a random sign vᵢ equal to +1 or −1, to its fitted value xᵢᵀβ̂. The model is refitted on y*, and the spread of the resulting coefficient estimates across replicates is used to compute standard errors and confidence intervals. Because each residual stays with its own observation, the per-observation variance pattern is retained. The formula as written draws one sign per observation; grouped (cluster) data require a variant that draws signs at the cluster level. The random weights are chosen so that the bootstrap errors have mean zero and the second and third moments of the residuals are preserved. Symmetric ±1 weights are simple but do not by themselves match the third moment, so for skewed errors asymmetric two-point weights are the appropriate choice. Confidence intervals are typically percentile intervals, taken from the quantiles of the bootstrap distribution of the coefficient estimates. For a hypothesis test, the bootstrap test statistic is compared with the upper percentile of the bootstrap distribution of that statistic; the resampling is normally carried out under the null hypothesis, so that the residuals come from the restricted fit.
Formula
y_i^{*} = x_i^{\top}\hat{\beta} + \hat{\varepsilon}_i \, v_i, \quad v_i \in \{-1, +1\}Common pitfalls
- Applying it to data with constant error variance, where it adds computation without a clear gain over simpler inference.
- Using too few bootstrap replicates, so that confidence intervals change noticeably between runs and are hard to reproduce. The bootUR implementation of a related wild bootstrap procedure uses 1999 replications by default and 199 in its example; the number should be large enough for stable intervals, checked by repeating the run with different random seeds.
- Running the per-observation version on clustered data; within-cluster correlation is then not preserved, and a wild cluster bootstrap is needed.
- Trusting intervals from small samples, where the sign-flipped residuals may not approximate the error distribution well.
Frequently asked questions
How does the wild bootstrap differ from the ordinary bootstrap?
The ordinary (pairs or residual) bootstrap resamples whole observations or residuals as if they were interchangeable, which assumes a constant error variance. The wild bootstrap instead keeps each residual fixed to its own observation and only flips its sign with a random weight, preserving the per-observation variance and making the inference valid under heteroscedasticity.
When is it preferable to the standard bootstrap?
It is most useful when the error variance is non-constant (heteroscedastic) or the data have a cluster structure, since the ordinary bootstrap can lead to size distortions, particularly under heteroscedasticity. This entry does not report a direct comparison on any particular dataset, so the advantage should be checked for the data at hand.
What is a wild cluster bootstrap?
It is the variant where the random sign is drawn once per cluster rather than per observation, so all residuals within a group are flipped together. This preserves within-cluster correlation and is the appropriate form when observations are grouped, particularly when the number of clusters is small.
How small a sample is too small?
There is no established minimum sample size for this method. Small samples make the residual-based approximation less reliable, so results should be interpreted cautiously and checked with diagnostics or alternative methods.
Related methods
Sources
Wu, C. F. J. (1986). Jackknife, Bootstrap and Other Resampling Methods in Regression Analysis. Annals of Statistics, 14(4), 1261-1295.
Open DOI referenceDavidson, R., & Flachaire, E. (2008). The Wild Bootstrap, Tamed at Last. Journal of Econometrics, 146(1), 162-169.
Open DOI referencebootUR, boot_ur documentation, page not recorded