Choose your reading route
eduKateSG · Why Mathematics? · Cluster Bootstrap: Whole Groups and Within-Cluster Dependence
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 8–14
Reproduce the example
Audit the numbers one step at a time.Route 3 · Chapters 15–21
Check assumptions
See where design and calibration matter.Route 4 · Chapters 22–28
Explore applications
Connect the method to a concrete investigation.Route 5 · Chapters 29–34
Study and verify
Practise, inspect failure cases and read further.
Full chapter index · Practice and checking · Mathematics Learning Hub
Why is mathematics important when pupils, patients, households or repeated measurements are more alike inside groups than across groups? The pairs cluster bootstrap resamples whole clusters with replacement. It preserves the observed rows and dependence pattern inside each selected group while treating clusters as the independent sampling units.
Did You Know? A dataset with 2,000 rows but only 20 independently sampled schools may carry closer to 20 resampling units than 2,000. Resampling individual rows can manufacture false precision by breaking the school-level dependence.
Full chapter index
Chapters 1–7 · Understand the question
Chapters 8–14 · Reproduce the example
Chapters 15–21 · Check assumptions
Chapters 22–28 · Explore applications
Chapters 29–34 · Study and verify
When errors or outcomes are correlated within villages, schools, firms or people, the sampling unit is not each row. Resampling complete groups respects the design that generated independent information.
Cameron and Miller describe cluster-robust inference for errors independent across clusters but correlated within them, including pairs cluster resampling. Read the University of California record.
With G observed clusters, draw G cluster labels with replacement. Include every row belonging to each selected label. A selected cluster can appear multiple times and another can be absent.
Suppose clusters A, B, C, D contain 3, 2, 4 and 1 rows. A bootstrap draw (B,D,B,A) creates 2+1+2+3=8 rows while preserving all rows inside each chosen occurrence.
| Sizes A,B,C,D | Selected labels | Rows |
|---|---|---|
| 3,2,4,1 | B,D,B,A | 8 |
If cluster outcome means are A=4, B=7, C=5 and D=10, the unweighted mean of selected cluster means for (B,D,B,A) is (7+10+7+4)/4=7.
| Selected means | Mean |
|---|---|
| 7,10,7,4 | 7 |
A row-weighted overall mean differs from an equal-cluster mean when sizes vary. The estimator and scientific target decide whether selected cluster occurrences contribute by their rows or by equal group weights.
All within-cluster rows travel together, so observed serial, household or school dependence is retained. The method does not invent new within-cluster patterns.
Pairs cluster resampling usually assumes clusters are independent or weakly dependent. National shocks, spatial spillovers or overlapping memberships can violate this assumption.
A few large clusters can dominate row-weighted estimates. Resampling cluster labels reproduces size variation, but extreme imbalance may yield unstable replicates and effective information concentrated in few groups.
With small G, the empirical distribution of clusters is coarse. Cameron, Gelbach and Miller found that pairs cluster bootstrap may not eliminate over-rejection in some few-cluster settings, motivating wild cluster procedures.
A cluster bootstrap-t statistic centres the replicate estimate and divides by a cluster-robust replicate standard error. Tail quantiles calibrate tests or intervals while retaining cluster-level resampling.
When cluster fixed effects are present, resampling full clusters can be coherent for some estimands. Designs with treatment fixed at cluster level and very few treated groups need additional randomisation or small-sample reasoning.
A row may belong to a firm and a year. Resampling only firms preserves firm dependence but not shared-year shocks. Multiway bootstrap design is not solved by attaching two labels casually.
For students sampled through schools, resample schools and keep each school’s pupil records. If schools were sampled within regions, region strata may also need preservation.
Longitudinal visits within a person form one cluster. Resampling people retains each observed visit sequence but does not model time dependence beyond those sequences.
Out-of-bag clusters can assess transport to unseen groups, whereas out-of-bag rows inside represented clusters answer a different prediction question.
Row resampling assumes row-level exchangeability. Cluster resampling assumes group-level exchangeability and preserves observed membership, making the distinction substantive rather than computational.
Pairs cluster bootstrap resamples outcome-predictor clusters. Wild cluster bootstrap holds design rows fixed and applies cluster-level residual weights, often targeting regression tests with few groups.
CHAPTER 19 OF 34 · Check assumptions
19. Comparison with cluster-robust standard errors
Cluster-robust formulas use asymptotic covariance estimates. Cluster bootstrap approximates a sampling distribution by group resampling; both require enough independent clusters and correct clustering.
Verify cluster labels and counts, compare row and cluster targets, simulate realistic intra-cluster correlation, vary G, inspect failures and benchmark pairs against wild cluster or analytic methods.
Whole-cluster resampling cannot fix nonrepresentative clusters, cross-cluster spillovers, too few groups, wrong cluster boundaries, treatment confounding or unsupported causal claims.
Create one cluster table containing label, size, summary and selection count. Expand selected clusters only after preserving occurrence IDs so duplicated groups remain distinguishable.
Sample G labels with replacement, join all member rows and unit-test draw (B,D,B,A), 8 rows and cluster-mean result 7. Save cluster-level seeds and fit failures.
Cluster resampling matters in education, medicine, economics, policy and industrial experiments. Careers require study-design knowledge, multilevel reasoning and reproducible computing.
Simulate students nested in schools, compare row and cluster bootstrap standard errors as intra-class correlation rises, and measure coverage across G=10, 30 and 100.
More rows do not equal more clusters, equal cluster weighting is not always the target, and resampling groups does not guarantee valid causal inference.
CHAPTER 27 OF 34 · Explore applications
27. Connection to recent mathematics articles
The wild-cluster-bootstrap guide explains cluster-level residual weights. The cluster-robust standard-error guide explains analytic covariance.
Students should draw four cluster labels and count resulting rows. Parents can ask what the independent unit is and whether the number of clusters is adequate.
- Count rows in the worked draw.
- Calculate the equal-cluster mean.
- Compare with row weighting.
- Diagnose shared-year dependence.
- Explain few-cluster risk.
### What is resampled? Whole clusters.
### How many draws? Usually G cluster labels.
### Are rows inside a cluster separated? No.
### Is it always good with few clusters? No.
Report estimand, cluster definition, G, size distribution, resampling rule, B, seed, weighting, replicate standard error, failures, few-cluster checks and cross-cluster dependence.
Within-cluster similarity reduces independent information relative to the row count. The exact design effect depends on cluster sizes and intra-cluster correlation, so G and size distribution belong beside n in every report.
Confirm cluster ownership, preserved groups, correct estimator weighting, adequate G, transparent multiway issues, robust failure handling and no row-level precision claim from clustered data.
Continue through the Mathematics Learning Hub. Reproduce one cluster, stratum, autoregressive or spatial-block calculation by hand before trusting a large automated run.
Extended practice laboratory
Practice case 1: Identify clusters
Setup: Start from the article’s cluster-bootstrap 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 grouping, recursion or geometry identity, and state one diagnostic 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 G
Setup: Start from the article’s cluster-bootstrap 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 grouping, recursion or geometry identity, and state one diagnostic 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: List cluster sizes
Setup: Start from the article’s cluster-bootstrap 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 grouping, recursion or geometry identity, and state one diagnostic 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: Draw cluster labels
Setup: Start from the article’s cluster-bootstrap 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 grouping, recursion or geometry identity, and state one diagnostic 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: Expand selected groups
Setup: Start from the article’s cluster-bootstrap 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 grouping, recursion or geometry identity, and state one diagnostic 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: Count rows
Setup: Start from the article’s cluster-bootstrap 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 grouping, recursion or geometry identity, and state one diagnostic 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: Calculate cluster mean
Setup: Start from the article’s cluster-bootstrap 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 grouping, recursion or geometry identity, and state one diagnostic 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: Calculate row mean
Setup: Start from the article’s cluster-bootstrap 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 grouping, recursion or geometry identity, and state one diagnostic 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: Add unequal sizes
Setup: Start from the article’s cluster-bootstrap 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 grouping, recursion or geometry identity, and state one diagnostic 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: Increase correlation
Setup: Start from the article’s cluster-bootstrap 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 grouping, recursion or geometry identity, and state one diagnostic 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: Use percentile interval
Setup: Start from the article’s cluster-bootstrap 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 grouping, recursion or geometry identity, and state one diagnostic 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: Use bootstrap-t
Setup: Start from the article’s cluster-bootstrap 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 grouping, recursion or geometry identity, and state one diagnostic 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: Add fixed effects
Setup: Start from the article’s cluster-bootstrap 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 grouping, recursion or geometry identity, and state one diagnostic 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: Use school data
Setup: Start from the article’s cluster-bootstrap 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 grouping, recursion or geometry identity, and state one diagnostic 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: Use repeated visits
Setup: Start from the article’s cluster-bootstrap 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 grouping, recursion or geometry identity, and state one diagnostic 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: Reduce G
Setup: Start from the article’s cluster-bootstrap 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 grouping, recursion or geometry identity, and state one diagnostic 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: Add shared shock
Setup: Start from the article’s cluster-bootstrap 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 grouping, recursion or geometry identity, and state one diagnostic 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: Compare row bootstrap
Setup: Start from the article’s cluster-bootstrap 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 grouping, recursion or geometry identity, and state one diagnostic 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: Compare wild cluster
Setup: Start from the article’s cluster-bootstrap 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 grouping, recursion or geometry identity, and state one diagnostic 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 robust SE
Setup: Start from the article’s cluster-bootstrap 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 grouping, recursion or geometry identity, and state one diagnostic 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: Increase B
Setup: Start from the article’s cluster-bootstrap 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 grouping, recursion or geometry identity, and state one diagnostic 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: Change seed
Setup: Start from the article’s cluster-bootstrap 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 grouping, recursion or geometry identity, and state one diagnostic 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: Audit failures
Setup: Start from the article’s cluster-bootstrap 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 grouping, recursion or geometry identity, and state one diagnostic 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 cluster-bootstrap 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 grouping, recursion or geometry identity, and state one diagnostic 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 cluster-bootstrap 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 grouping, recursion or geometry identity, and state one diagnostic 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.