Evaluating one-way and two-way cluster-robust covariance matrix estimates
In this presentation, I update Nichols and Schaffer's 2007 UK Stata Users Group 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 requirement rules out the possibility of defining clusters in the time dimension and modeling contemporaneous dependence of panel units' error processes. I build upon recent analytical developments that define two-way (and conceptually, n-way) clustering and upon the 2010 implementation of two-way clustering in the widely used ivreg2 and xtivreg2 packages. I present examples of the utility of one-way and two-way clustering using Monte Carlo techniques, I present a comparison with alternative approaches to modeling error dependence, and I consider tests for clustering of errors.