Evaluating one-way and two-way cluster-robust covariance matrix estimates
This presentation updates Nichols and Schaffer's 2007 UKSUG talk on clustered standard errors. Although cluster-robust standard errors are now recognized as essential in a panel data context, official Stata only supports clusters that are nested within panels. This rules out the possibility of defining clusters in the time dimension, and modeling contemporaneous dependence of panel units' error processes. We build upon recent analytical developments that define 2-way (and conceptually n-way) clustering, and the implementation in 2010 of 2-way clustering in the widely used ivreg2 and xtivreg2 packages. We present examples of the utility of 1-way and 2-way clustering using Monte Carlo techniques, a comparison with alternative approaches to modeling error dependence, and consider tests for clustering of errors.