Why Correct a Clustered Variance Estimate?
Cluster-robust standard errors allow observations within the same cluster to have related errors. But allowing that dependence does not make the estimated variance automatically accurate in a small sample. When there are few independent clusters, the usual uncorrected cluster sandwich estimate can be downward biased, and clusters with high leverage can have residuals that understate their contribution to uncertainty. A correction can change the estimated variance even though it leaves the fitted regression coefficients unchanged.
The important distinction is between correcting an estimate and creating information. A finite-sample correction can address particular sources of bias in the variance estimate; it cannot make a small number of independent clusters behave like a large one. The number of clusters, the distribution of leverage across clusters, and the correction used should therefore be considered together.
Setup and the Uncorrected Estimate
Suppose the data follow the linear regression model \(y=X\beta+u\), where \(y\) is the \(n\)-vector of outcomes, \(X\) is the \(n\)-by-\(k\) design matrix of full column rank, \(\beta\) is the coefficient vector, and \(u\) is the error vector. The observations are partitioned into \(G\) clusters. Write \(X_g\) for the rows of \(X\) in cluster \(g\), and \(e_g\) for the corresponding OLS residuals. The OLS estimate is \(\hat{\beta}=(X'X)^{-1}X'y\).
For cluster-robust inference, the working assumptions include a correctly specified conditional mean, independent clusters, and potentially arbitrary dependence and unequal variances within a cluster. The sandwich estimate is an estimate of the sampling variance of \(\hat{\beta}\); its standard errors are the square roots of its diagonal entries. The cluster sandwich relies on the number of independent clusters being large enough for its usual approximation to work well. Corrections address finite-sample features of this estimate, not violations of the mean model or dependence between clusters.
CR1: A Scalar Degrees-of-Freedom Correction
CR1 multiplies the entire CR0 variance matrix by a scalar. There are several conventions for that scalar in statistical software. In this tutorial, CR1 means the following frequently used correction, with \(n\) observations, \(G\) clusters, and \(k\) estimated regression coefficients:
When \(G>1\) and \(n>k\), this multiplier is greater than one. Since standard errors are square roots of variance estimates, multiplying the variance by \(c_1\) multiplies each CR0 standard error by \(\sqrt{c_1}\), not by \(c_1\). This distinction matters when describing the size of the adjustment.
Worked Example: Calculating the CR1 Change
Suppose a hypothetical regression has \(n=64\) observations, \(G=8\) clusters, and \(k=3\) coefficients. For a particular coefficient, suppose its CR0 variance estimate is \(0.0400\) outcome-units squared. Calculate the CR1 variance and standard error, and compare them with CR0.
First calculate the specified scalar:
The CR1 variance is \(1.180328(0.0400)=0.0472131\) outcome-units squared. The variance therefore increases by \((1.180328-1)100\%=18.033\%\), approximately.
The CR0 standard error is \(\sqrt{0.0400}=0.2000\) outcome units. The CR1 standard error is \(\sqrt{0.0472131}=0.217286\) outcome units. Its percentage increase is
Thus, in this example CR1 increases the estimated variance by about 18.033%, but the standard error by about 8.643%. These are descriptions of estimates, not claims about the probability that a coefficient is correct.
CR2: Adjusting for Cluster Leverage
A scalar correction treats the clusters alike. CR2 instead adjusts cluster residuals for leverage, which can differ substantially across clusters. To define a common version, use a homoskedastic working model as the reference for the adjustment. Let \(H=X(X'X)^{-1}X'\) be the OLS hat matrix, and let \(H_{gg}\) be its block of rows and columns for cluster \(g\). When \(I-H_{gg}\) is nonsingular, define \(A_g=(I-H_{gg})^{-1/2}\), the symmetric inverse square root. CR2 replaces \(e_g\) by \(A_ge_g\) in the cluster score:
The adjustment is motivated by a finite-sample problem: fitted values use the same data as residuals, so high leverage can shrink residuals. Under the stated homoskedastic working model, this CR2 adjustment is designed to correct the bias in the covariance estimate. It does not assert that actual errors are homoskedastic; cluster-robust estimation still permits within-cluster dependence. More general CR2 implementations can define adjustments relative to other specified working covariance structures.
Worked Example: CR2 With Equal-Size Clusters
Consider a hypothetical intercept-only regression with three clusters, each containing two observations. The response values are \(1,3\) in cluster 1, \(3,5\) in cluster 2, and \(5,7\) in cluster 3. Calculate CR0 and CR2 for the intercept.
The overall mean is \(\bar{y}=4\). The residuals in the clusters are \((-3,-1)\), \((-1,1)\), and \((1,3)\), so the cluster residual sums \(S_g=X_g'e_g\) are \(-4,0,4\). With \(n=6\) and an intercept-only design, the CR0 variance of the mean is
For each cluster, the block \(H_{gg}\) has leverage \(1/3\) in the constant-within-cluster direction. The residual sum is in that direction, so CR2 multiplies each cluster score by \(1/\sqrt{1-1/3}\). Consequently, each squared score is multiplied by \(1/(1-1/3)=1.5\), giving
The corresponding standard errors are \(\sqrt{8/9}\approx0.9428\) and \(\sqrt{4/3}\approx1.155\), in outcome units. Here CR2 and CR1 coincide: CR1 has multiplier \((3/2)(5/5)=1.5\). This agreement follows from the balanced, intercept-only setup; it is not a general identity.
Why Leverage Can Make the Corrections Differ
In the intercept-only model, the effect of CR2 on a cluster's score has a particularly clear form. If cluster \(g\) contains \(n_g\) observations out of \(n\), its constant-direction leverage is \(n_g/n\). The CR2 squared-score contribution is therefore divided by \(1-n_g/n\). A larger cluster has greater leverage and receives a larger adjustment. CR1, by contrast, applies one common multiplier regardless of cluster size or leverage.
This also explains when a correction may materially affect uncertainty. The change is more consequential when the number of clusters is small, when some clusters have high leverage, or when influential cluster scores contribute strongly to a coefficient's variance. A correction may have little effect if the scalar is close to one and leverage is modest and evenly distributed. Neither pattern should be assumed without examining the design and the resulting estimates.
Worked Example: Comparing CR0, CR1, and CR2 With Unequal Cluster Sizes
Suppose a hypothetical intercept-only regression has three clusters of sizes \(1\), \(2\), and \(3\). The observed outcomes are \(2\) in cluster 1, \(0,0\) in cluster 2, and \(-2/3,-2/3,-2/3\) in cluster 3. The total is \(2+0-2=0\), so the fitted intercept is \(0\), and the cluster residual sums are \(2,0,-2\). Here \(n=6\), \(G=3\), and \(k=1\).
The uncorrected variance is
For CR1, the multiplier is
For CR2, the cluster leverage in the constant direction is \(n_g/6\). Cluster 1's squared score is adjusted by \(1/(1-1/6)=6/5\); cluster 2's score is zero; cluster 3's squared score is adjusted by \(1/(1-3/6)=2\). Therefore,
The standard errors are approximately \(0.4714\) for CR0, \(0.5774\) for CR1, and \(0.5963\) for CR2 outcome units. The largest cluster has half of all observations and receives a relatively strong CR2 adjustment, which is why CR2 is slightly larger than CR1 here. This is a specific calculation, not a rule that CR2 must exceed CR1.
How to Choose and Report a Correction
The corrections answer related but different questions. CR1 applies a transparent scalar adjustment to account for finite-sample degrees of freedom. CR2 adjusts residual scores for leverage relative to a working covariance model. Their numerical results can be similar, as in the balanced example, or different, as in the unequal-size example. Comparisons should use the same regression specification and clustering definition so that the change reflects the correction rather than a change in analysis.
When reporting clustered results, identify the clustering level, the number of clusters, the variance estimator and the precise correction convention. This last detail matters because CR1 formulas vary across software. State the estimated coefficient and its standard error with units, and avoid describing a corrected standard error as if it had changed the coefficient itself. The degrees-of-freedom method used for a later test or interval is a separate choice; a variance correction alone does not specify that procedure.
Common Mistake
A common mistake is to say, “CR1 multiplies the standard error by \(c_1\), so an 18% variance correction means an 18% standard-error increase.” The first claim is wrong because CR1 multiplies the variance by \(c_1\); the standard error is multiplied by \(\sqrt{c_1}\). In the eight-cluster example, the variance rises by about 18.033%, while the standard error rises by about 8.643%. Another mistake is to assume CR2 always gives a larger value than CR1. The calculations depend on leverage and cluster scores, so the two estimates must be compared for the actual design.
Check Your Understanding
Use the definitions and calculations above to answer these questions.
- Why does multiplying a variance estimate by \(c_1\) multiply the corresponding standard error by \(\sqrt{c_1}\) rather than \(c_1\)?
- For \(G=10\), \(n=50\), and \(k=4\), calculate the CR1 multiplier using the convention in this tutorial.
- In an intercept-only model, why does a cluster with a larger share of all observations receive a stronger CR2 adjustment to its constant-direction score?
- Can CR2 be assumed to be larger than CR1 for every regression? Explain using the role of cluster leverage and scores.
- Name two pieces of information, in addition to the coefficient and its standard error, that should be reported for a clustered regression.