Tutorials › Econometrics (Graduate) › Wild Bootstrap-t Tests With Robust Standard Errors

Heteroskedasticity-Robust Inference · Tutorial 120 of 952

Wild Bootstrap-t Tests With Robust Standard Errors

Build and interpret wild bootstrap-t tests for regression coefficients and scalar linear restrictions when error variance may differ across observations.

Intermediate 12 min read

What You'll Learn

  • State the regression and regularity conditions for a wild bootstrap-t test.
  • Construct bootstrap outcomes under a null hypothesis using restricted residuals and mean-zero multiplier weights.
  • Studentize each bootstrap coefficient or contrast with a robust covariance estimate.
  • Calculate bootstrap p-values and test-specific critical values.
  • Distinguish bootstrap calibration from an exact finite-sample test and identify common failures.

Why Bootstrap the Robust t Statistic?

A heteroskedasticity-robust standard error avoids assuming that all observations have the same error variance. But the usual robust t reference distribution is an approximation, and that approximation can be inaccurate in some finite samples. A wild bootstrap-t test refines the calibration by generating data under the null hypothesis, recomputing a robust standard error in every bootstrap sample, and using the resulting studentized statistics to assess the observed statistic.

The procedure is not simply a bootstrap of the estimated coefficient. Each bootstrap statistic is centered at the null value and divided by its own bootstrap robust standard error. That studentization matters: the bootstrap distribution represents the test statistic, not just the variation in the estimate.

Definition: For a regression coefficient vector \(\beta\), a scalar linear restriction has the form \(H_0:r'\beta=q\), where \(r\) is a specified nonzero vector and \(q\) is a specified number. A wild bootstrap-t test imposes this null when generating bootstrap outcomes, refits the unrestricted regression to each outcome, and compares the observed studentized statistic with the bootstrap distribution of studentized statistics.

Model and Bootstrap Construction

Consider the linear regression model \(y_i=x_i'\beta+u_i\), for \(i=1,\ldots,n\), where \(y_i\) is the outcome, \(x_i\) is a vector of regressors, and \(\beta\) is the coefficient vector. The standard setting for this procedure treats the regressors as fixed, or conditions on their observed values. Assume the design matrix has full column rank, \(E(u_i\mid X)=0\), and errors are independent across observations but may have different conditional variances. Suitable finite-moment and leverage conditions are also needed for the approximation; in particular, no single observation should dominate the regression as sample size grows.

These conditions allow heteroskedasticity but do not allow arbitrary dependence across observations. In particular, a wild bootstrap designed for independent observations is not automatically appropriate for clustered or serially dependent errors.

Fit the regression subject to \(r'\beta=q\), giving the restricted estimate \(\hat{\beta}_0\) and restricted residuals \(\hat{u}_{0i}=y_i-x_i'\hat{\beta}_0\). A common choice is the Rademacher multiplier \(v_i\), which independently equals \(+1\) or \(-1\) with probability one-half. It has mean zero and variance one. For each bootstrap replication, generate

$$ y_i^*=x_i'\hat{\beta}_0+\tilde{u}_{0i}v_i, $$

where \(\tilde{u}_{0i}\) is a restricted residual, optionally adjusted for leverage. For example, an HC2-style adjustment uses \(\tilde{u}_{0i}=\hat{u}_{0i}/\sqrt{1-h_{ii}}\), with \(h_{ii}\) the diagonal leverage from the regression design. The chosen adjustment should be stated and applied consistently. The restricted fitted value keeps the bootstrap data-generating process under \(H_0\); the multipliers let the bootstrap error size vary across observations instead of forcing a common variance.

Fit the unrestricted regression to each \(y^*\). Let \(\hat{\beta}^*\) be its coefficient estimate and let \(\widehat{V}^*\) be a heteroskedasticity-robust covariance estimate from that bootstrap regression. The bootstrap t statistic is

$$ t^*=\frac{r'\hat{\beta}^*-q} {\sqrt{r'\widehat{V}^*r}}. $$

Use the same robust covariance specification for the observed and bootstrap statistics—for example, HC2 in both. For the observed data, the statistic is \(t_{\mathrm{obs}}=(r'\hat{\beta}-q)/\sqrt{r'\widehat{V}r}\). A scalar coefficient test is the special case where \(r\) selects one coefficient.

From Bootstrap Statistics to a Test

Generate \(B\) bootstrap samples and calculate \(t_1^*,\ldots,t_B^*\). For a two-sided test at level \(\alpha\), compare \(|t_{\mathrm{obs}}|\) with the empirical \(1-\alpha\) quantile of \(|t_1^*|,\ldots,|t_B^*|\). Reject \(H_0\) when the observed absolute statistic exceeds that test-specific critical value. Alternatively, estimate the two-sided p-value by counting bootstrap statistics at least as extreme as the observed one. A common finite-simulation estimate is

$$ \hat{p}_{\mathrm{boot}} = \frac{1+\sum_{b=1}^B \mathbf{1}\{|t_b^*|\geq |t_{\mathrm{obs}}|\}}{B+1}. $$

The added one avoids reporting a zero p-value merely because no simulated statistic crossed the observed threshold. For a one-sided alternative, use the corresponding tail of the signed bootstrap statistics and its one-sided quantile. These are bootstrap approximations, not exact finite-sample probabilities: their quality depends on the model conditions and on how well the resampling scheme reproduces the statistic’s sampling behavior.

1
Compute the observed statistic.
Fit the unrestricted model and calculate the robust t statistic for the stated coefficient or scalar contrast.
2
Impose the null for resampling.
Fit the restricted model, obtain restricted residuals, and multiply them by independent mean-zero, variance-one weights.
3
Refit and studentize.
For every bootstrap outcome, fit the unrestricted model and recompute the same type of robust covariance and t statistic.
4
Calibrate the test.
Use the empirical tail probability or the appropriate test-specific bootstrap quantile, then report the decision and its meaning in context.

Worked Tests

Worked Example: Two-Sided Test of a Slope

Suppose a hypothetical regression estimates the slope relating a training measure to weekly productivity, measured in units of output per training hour. The unrestricted estimate is \(1.400\), and its HC2 robust standard error is \(0.1772\). Test \(H_0:\beta_1=1\) against \(H_a:\beta_1\ne 1\) at \(\alpha=0.05\). Assume observations are independent conditional on the regressors, the conditional mean is correctly specified for this target, and the regression design has no extreme leverage.

Observed statistic. The null value is one unit of output per training hour, so

$$ t_{\mathrm{obs}}=\frac{1.400-1}{0.1772} =\frac{0.400}{0.1772}\approx 2.257. $$

Now suppose 999 null-imposed wild bootstrap replications are generated using the same HC2 studentization. In 41 replications, \(|t_b^*|\geq 2.257\). The two-sided p-value estimate is

$$ \hat{p}_{\mathrm{boot}}=\frac{1+41}{999+1} =\frac{42}{1000}=0.042. $$

Suppose also that the empirical 95th percentile of \(|t_b^*|\) is 2.210. Since \(2.257>2.210\), the test rejects the null at the 5% level. The bootstrap evidence is inconsistent with a slope of exactly one at that level; it does not establish that training causes productivity to change.

Worked Example: A Linear Contrast

In a hypothetical regression, two coefficients represent the effects of two related policy measures. Their estimates are \(\hat{\beta}_1=0.800\) and \(\hat{\beta}_2=-0.100\). Consider the scalar null \(H_0:\beta_1+\beta_2=0\), so \(r=(1,1)'\) and \(q=0\). Suppose the relevant HC2 covariance submatrix is

$$ \widehat{V}_{(1,2)}= \begin{pmatrix} 0.040 & 0.010\\ 0.010 & 0.090 \end{pmatrix}. $$

The estimated contrast is \(0.800+(-0.100)=0.700\). Its variance is the sum of both variances and twice their covariance:

$$ r'\widehat{V}r=0.040+0.090+2(0.010)=0.150, \qquad SE=\sqrt{0.150}=0.3873. $$

Thus \(t_{\mathrm{obs}}=0.700/0.3873\approx 1.807\). In each bootstrap replication the restricted regression imposes the sum-zero condition. For illustration, suppose one bootstrap fit gives a contrast estimate of \(0.500\), with HC2 variance components \(0.030\), \(0.040\), and covariance \(0.005\). Its bootstrap variance is \(0.030+0.040+2(0.005)=0.080\), so \(SE^*=\sqrt{0.080}=0.2828\), and \(t^*=0.500/0.2828\approx1.768\). This single replication is not a test result; the decision uses the distribution from all replications.

Worked Example: One-Sided Test and Critical Value

A hypothetical study estimates that an intervention increases an outcome, measured in points, by \(\hat{\beta}=2.40\) points, with robust standard error \(1.00\) point. Test \(H_0:\beta=0\) against \(H_a:\beta>0\). Assume the same independent-error and regularity conditions described above.

The observed statistic is \(t_{\mathrm{obs}}=(2.40-0)/1.00=2.40\). Suppose \(B=499\) wild bootstrap replications are generated under the null, and 18 have \(t_b^*\geq2.40\). The one-sided bootstrap p-value estimate is \((1+18)/(499+1)=19/500=0.038\). Suppose the empirical 95th percentile of the signed bootstrap statistics is 1.95. Because \(2.40>1.95\), the null is rejected at the 5% level in favor of a positive coefficient. The p-value is an estimate of how often a statistic this large or larger would occur under the null bootstrap scheme, not the probability that the null hypothesis is true.

Why Studentization and Null Imposition Matter

Studentization allows each bootstrap replication to reflect not only a different coefficient estimate but also the uncertainty associated with that particular bootstrap sample. If one instead compared unstudentized coefficient deviations, the resulting distribution would not directly calibrate the robust t statistic being used for the observed test. The covariance estimate must therefore be recomputed in each replication, not held fixed at its observed-data value.

Null imposition is equally important. The test asks how unusual the observed statistic would be if \(H_0\) held. Generating bootstrap outcomes around the unrestricted fitted values generally fails to reproduce that null reference distribution. Generating them around restricted fitted values makes the restriction true in the bootstrap data-generating process, while the unrestricted refit measures how far each sample estimate wanders from that restriction.

A brief justification follows from the construction. Conditional on the observed design, the multipliers have \(E(v_i)=0\) and \(E(v_i^2)=1\). Consequently, the bootstrap disturbance \(\tilde{u}_{0i}v_i\) has conditional mean zero and conditional variance \(\tilde{u}_{0i}^{\,2}\). This retains observation-specific residual scale rather than imposing one common variance. Under regularity conditions, the resulting coefficient fluctuations and their robust standard errors approximate the corresponding null sampling behavior. Studentizing both the observed statistic and every bootstrap draw then permits comparison on the same scale. This argument motivates the approximation; it does not make the procedure exact in finite samples.

Common Pitfalls and Reporting

  • Resampling pairs instead of residual signs. That describes a different bootstrap. The wild bootstrap keeps the design fixed and varies residual contributions with multipliers, a feature useful when conditional variances differ.
  • Generating outcomes from the unrestricted fit. This does not impose the null. Use restricted fitted values when constructing bootstrap outcomes for a null test.
  • Using the observed standard error for every replication. That removes the bootstrap studentization. Recalculate the selected robust covariance estimate in each bootstrap sample.
  • Calling the result an exact test. The bootstrap p-value and critical value are simulation-based approximations whose reliability depends on the assumptions and design.
  • Ignoring dependence or severe leverage. Independent-observation wild multipliers do not automatically handle clustered errors, and extreme leverage can undermine the approximation. Match the method to the sampling structure and inspect the design.

A clear report states the restriction, the robust covariance variant, how restricted residuals were handled, the multiplier distribution, the number of replications, and whether the result uses a bootstrap p-value or critical value. Include the observed statistic and interpret the conclusion in the outcome’s units. This makes the calibration choices visible and the inference reproducible.

Check Your Understanding

Answer these questions using the definitions and procedure above.

  1. Why are bootstrap outcomes generated from restricted rather than unrestricted fitted values when testing a null restriction?
  2. For \(H_0:r'\beta=q\), write the formula for the observed robust t statistic and the corresponding bootstrap statistic.
  3. If the observed two-sided statistic has absolute value 2.1, what feature of the bootstrap distribution determines the test-specific 5% critical value?
  4. Why must the robust covariance estimate be recomputed in each bootstrap replication?
  5. What does a two-sided bootstrap p-value estimate, and why is it not the probability that \(H_0\) is true?
Clinical Biostats