Choose your reading route
eduKateSG · Why Mathematics? · Wild Cluster Bootstrap: Few Clusters and Restricted Resampling
Start with the question, audit the worked example, or jump to the assumptions and practice. Every chapter stays open for uninterrupted reading.
Understand the question
Define the quantity and follow the mechanism.Route 2 · Chapters 6–11
Reproduce the example
Audit the numbers one step at a time.Route 3 · Chapters 12–18
Check assumptions
See where design and calibration matter.Route 4 · Chapters 19–24
Explore applications
Connect the method to a concrete investigation.Route 5 · Chapters 25–35
Study and verify
Practise, inspect failure cases and read further.
Full chapter index · Practice and checking · Mathematics Learning Hub
Why is mathematics important when observations are clustered and the number of independent groups is too small or too uneven for ordinary cluster-robust asymptotics to feel comfortable? The wild cluster bootstrap applies one random weight to every residual within a cluster, preserving within-group co-movement while generating a reference distribution for a hypothesis test.
Did You Know? Giving all rows in a cluster the same bootstrap weight is the key difference from observation-level wild bootstrap. The cluster, not the row, is the independent resampling unit.
Full chapter index
Chapters 1–5 · Understand the question
Chapters 6–11 · Reproduce the example
Chapters 12–18 · Check assumptions
Chapters 19–24 · Explore applications
Chapters 25–35 · Study and verify
Cluster-robust standard errors rely on many independent clusters under standard asymptotics. With few groups or severely uneven sizes, test rejection rates can be distorted. Wild cluster bootstrap is a finite-sample improvement strategy, not a promise of validity in every tiny design.
Stata documents wild cluster bootstrap inference for linear regression and lists supported weight distributions and p-value rules. Read the manual and overview.
For a null hypothesis about a coefficient or linear combination, fit the model subject to that restriction and save restricted fitted values and residuals. Generating data under the null makes the bootstrap reference distribution match the tested claim.
For replicate b, draw v_g for every cluster g. Set y_ig*=restricted_fitted_ig+restricted_residual_ig v_g for all rows i in g. The shared v_g preserves the sign and relative pattern of residuals inside the cluster.
| Cluster | Fitted | Residual |
|---|---|---|
| A | 10, 11 | 1, -1 |
| B | 20, 22 | 2, -2 |
Suppose restricted fitted values are [10,11] in cluster A and [20,22] in B, with residuals [1,−1] and [2,−2]. Draw cluster weights v_A=−1, v_B=+1. Pseudo-outcomes are [9,12] and [22,20].
| vA | vB | A outcomes | B outcomes |
|---|---|---|---|
| -1 | 1 | 9, 12 | 22, 20 |
Refit the unrestricted model to each pseudo-outcome and calculate the target t statistic with a cluster covariance. The distribution of these t statistics provides a bootstrap p-value or can be inverted for an interval.
Rademacher uses ±1. Mammen, Webb, gamma and normal weights are also supported by documented implementations. With very few clusters, the number of possible Rademacher sign patterns can be small, so weight choice matters.
Wild cluster methods can outperform ordinary asymptotic inference in some few-cluster settings, but five clusters are still not automatically safe. Validity depends on cluster sizes, leverage, treatment allocation, covariates and the exact bootstrap variant.
If a treatment varies only by cluster and very few clusters receive treatment, information about the treatment effect is especially limited. Research shows ordinary methods and wild bootstrap can fail in such designs. Count treated and control clusters separately.
A few huge clusters can dominate score contributions. Studentization and alternative weights may help, but sensitivity to cluster leverage and size imbalance must be examined.
Clusters can be influential because their predictor patterns or sizes are unusual. Delete-one-cluster diagnostics and leverage-aware bootstrap variants help reveal whether the conclusion rests on one group.
Restricted wild cluster bootstrap is common for tests because pseudo-data obey the null. Unrestricted variants answer a different approximation question. Name the choice rather than writing only “WCB”.
With Rademacher weights and small G, one can sometimes enumerate all 2^G sign patterns. With larger G or other distributions, random draws approximate the distribution. The finite pattern count limits p-value resolution.
If a programme is assigned to 12 schools, pupils within school share one treatment and environment. WCB resamples at school level. It cannot compensate if only one treated school exists or if spillovers connect schools.
A policy applied in a handful of regions creates few independent treatment contrasts. Wild cluster inference may be more defensible than a normal approximation, but substantive comparability, pre-trends and treatment timing remain essential.
CHAPTER 16 OF 35 · Check assumptions
16. Comparison with ordinary cluster covariance
Ordinary cluster covariance estimates one asymptotic variance matrix. WCB repeatedly regenerates outcomes and refits to approximate the test-statistic distribution. The latter is computationally heavier and method-choice sensitive.
CHAPTER 17 OF 35 · Check assumptions
17. Comparison with observation-level wild bootstrap
Observation-level weights vary by row and break within-cluster residual patterns. Cluster weights are shared within group. Using the wrong level misrepresents the sampling unit.
Report results across defensible weight distributions, restricted or unrestricted generation, cluster corrections and leave-one-cluster checks. Do not choose the variant that alone crosses a threshold.
State cluster unit and counts, treated-cluster counts, weight law, restriction, statistic, B or enumeration, seed and bootstrap p-value or interval.
Wild cluster bootstrap does not create missing clusters, repair one treated group, solve spillovers, fix omitted variables, guarantee balance, remove measurement error or identify causality.
Students can assign one coin flip per group and see why all group members move together, linking probability, experimental units and regression inference.
List clusters, restricted fitted values and residuals. Draw one weight per cluster, broadcast it to all group rows, build pseudo-outcomes, refit and record the studentized statistic.
Use a documented implementation, validate group labels and test a two-cluster hand example. Save cluster counts, options, seed, replicate statistics and failure logs.
Wild cluster methods support education, policy, labour economics, clinical research and regional experiments. Strong practice also requires understanding assignment units and institutional context.
Simulate 10, 20 and 50 clusters with balanced and unbalanced sizes. Compare asymptotic cluster tests and WCB size, then reduce treated-cluster count.
WCB is not automatically valid with any few-cluster design, does not resample rows independently, does not fix one treated cluster and does not prove causal identification.
The cluster-robust guide explains cluster scores. The two-way cluster guide explains crossed groups. The wild bootstrap guide explains observation-level weights.
Students should count independent and treated clusters before rows. Parents can ask whether treatment was assigned to pupils or schools and whether the resampling matches that unit.
- Recreate the two-cluster pseudo-outcomes.
- Explain shared weights.
- Count Rademacher patterns for G=5.
- Diagnose one treated cluster.
- Compare with ordinary CRVE.
### Is one weight drawn per row? No, per cluster.
### Does WCB always solve few clusters? No.
### Why impose the null? To generate its reference distribution.
### Can patterns be enumerated? Sometimes.
Report the ordered data unit, resampling unit, tuning parameter, statistic, number of replicates, random seed, interval or test rule and sensitivity checks. Separate Monte Carlo variation from uncertainty in the original study.
With G clusters and Rademacher weights there are at most 2^G sign vectors, often with symmetries. Very small G therefore limits the distinct reference distribution even before Monte Carlo sampling.
When treatment is assigned at cluster level, treatment contrasts live between clusters. Extra rows inside a cluster improve within-group measurement but cannot replace independent assignment groups.
Verify cluster and treatment counts, balance, leverage, restriction, weight distribution, covariance inside replicates, p-value rule, B or enumeration and seed. Report spillovers and few-treated-cluster limits.
Continue through the Mathematics Learning Hub. Reproduce one resample by hand before trusting automated repetitions.
Extended practice laboratory
Practice case 1: Name cluster unit
Setup: Start from the article’s wild cluster bootstrap worked mechanism for case 1. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the sampling unit, verify the probability or resampling identity and state one validation check before interpretation. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 2: Count clusters
Setup: Start from the article’s wild cluster bootstrap worked mechanism for case 2. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the sampling unit, verify the probability or resampling identity and state one validation check before interpretation. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 3: Count treated clusters
Setup: Start from the article’s wild cluster bootstrap worked mechanism for case 3. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the sampling unit, verify the probability or resampling identity and state one validation check before interpretation. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 4: Fit restricted model
Setup: Start from the article’s wild cluster bootstrap worked mechanism for case 4. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the sampling unit, verify the probability or resampling identity and state one validation check before interpretation. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 5: Save restricted residuals
Setup: Start from the article’s wild cluster bootstrap worked mechanism for case 5. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the sampling unit, verify the probability or resampling identity and state one validation check before interpretation. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 6: Choose weights
Setup: Start from the article’s wild cluster bootstrap worked mechanism for case 6. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the sampling unit, verify the probability or resampling identity and state one validation check before interpretation. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 7: Draw cluster signs
Setup: Start from the article’s wild cluster bootstrap worked mechanism for case 7. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the sampling unit, verify the probability or resampling identity and state one validation check before interpretation. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 8: Broadcast weights
Setup: Start from the article’s wild cluster bootstrap worked mechanism for case 8. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the sampling unit, verify the probability or resampling identity and state one validation check before interpretation. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 9: Build pseudo-outcomes
Setup: Start from the article’s wild cluster bootstrap worked mechanism for case 9. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the sampling unit, verify the probability or resampling identity and state one validation check before interpretation. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 10: Refit unrestricted model
Setup: Start from the article’s wild cluster bootstrap worked mechanism for case 10. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the sampling unit, verify the probability or resampling identity and state one validation check before interpretation. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 11: Calculate cluster t
Setup: Start from the article’s wild cluster bootstrap worked mechanism for case 11. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the sampling unit, verify the probability or resampling identity and state one validation check before interpretation. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 12: Repeat B times
Setup: Start from the article’s wild cluster bootstrap worked mechanism for case 12. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the sampling unit, verify the probability or resampling identity and state one validation check before interpretation. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 13: Calculate p-value
Setup: Start from the article’s wild cluster bootstrap worked mechanism for case 13. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the sampling unit, verify the probability or resampling identity and state one validation check before interpretation. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 14: Invert test
Setup: Start from the article’s wild cluster bootstrap worked mechanism for case 14. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the sampling unit, verify the probability or resampling identity and state one validation check before interpretation. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 15: Enumerate patterns
Setup: Start from the article’s wild cluster bootstrap worked mechanism for case 15. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the sampling unit, verify the probability or resampling identity and state one validation check before interpretation. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 16: Change weight law
Setup: Start from the article’s wild cluster bootstrap worked mechanism for case 16. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the sampling unit, verify the probability or resampling identity and state one validation check before interpretation. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 17: Unbalance clusters
Setup: Start from the article’s wild cluster bootstrap worked mechanism for case 17. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the sampling unit, verify the probability or resampling identity and state one validation check before interpretation. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 18: Add cluster leverage
Setup: Start from the article’s wild cluster bootstrap worked mechanism for case 18. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the sampling unit, verify the probability or resampling identity and state one validation check before interpretation. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 19: Reduce treated clusters
Setup: Start from the article’s wild cluster bootstrap worked mechanism for case 19. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the sampling unit, verify the probability or resampling identity and state one validation check before interpretation. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 20: Compare CRVE
Setup: Start from the article’s wild cluster bootstrap worked mechanism for case 20. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the sampling unit, verify the probability or resampling identity and state one validation check before interpretation. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 21: Delete one cluster
Setup: Start from the article’s wild cluster bootstrap worked mechanism for case 21. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the sampling unit, verify the probability or resampling identity and state one validation check before interpretation. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 22: Reject row-weight claim
Setup: Start from the article’s wild cluster bootstrap worked mechanism for case 22. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the sampling unit, verify the probability or resampling identity and state one validation check before interpretation. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 23: Report options
Setup: Start from the article’s wild cluster bootstrap worked mechanism for case 23. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the sampling unit, verify the probability or resampling identity and state one validation check before interpretation. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 24: Name limits
Setup: Start from the article’s wild cluster bootstrap worked mechanism for case 24. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the sampling unit, verify the probability or resampling identity and state one validation check before interpretation. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 25: Write conclusion
Setup: Start from the article’s wild cluster bootstrap worked mechanism for case 25. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the sampling unit, verify the probability or resampling identity and state one validation check before interpretation. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.