The small-sample correction raises the standard error, more with fewer cities
On the six cities, the sandwich alone gives 2.0, and cluster_se gives 2.240. The gap is one factor on the variance:
In words: the number of cities over one less than that, times the number of users minus 1 over the number of users minus the coefficients.
Here's why it's needed. Residuals are fitted, so they sit closer to zero than the true errors do. OLS already corrects for that by dividing by instead of . The cluster-robust estimator has the same bias at the city level, because its meat is built from only city scores.
Cameron and Miller give this factor and note that Stata uses it. The practice tests' expected values come from statsmodels, which applies it by default.
- On the six cities, . The standard error grows by , from 2.0 to 2.240.
- On the practice data, . The standard error grows by , from 0.4403 to 0.4460.
It shrinks the downward bias. It doesn't remove it, which is why the rest of this part exists.
In the editor, write correction(G, N, K=2): the factor, for the six cities and for the practice data.