25/36
Part 4 of 6 · Few citiesLearn and do
With equal city sizes and equal arms, the clustered standard error is a fixed multiple of this one
That 0.446 against 0.452 is no coincidence. With equal city sizes and equal arms:
In words: the clustered standard error is the city-means one times a factor just under 1. At 40 cities and 2,000 users the factor is 0.987.
So the sandwich is the city-means t-test in disguise. It has a slightly smaller standard error, and a slightly smaller cutoff, with degrees of freedom instead of . Those two small gaps are where its extra false positives with few cities come from.
In the editor, write sandwich_factor(G, N, K=2): the factor between the two standard errors.