Evaluating one-way and two-way cluster–robust covariance matrix estimates
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 two-way (and conceptually, n-way) clustering, and the 2010 implementation of two-way clustering in the widely used ivreg2 and xtivreg2 packages. We present examples of the utility of one-way and two-way clustering using Monte Carlo techniques, a comparison with alternative approaches to modeling error dependence, and consider tests for clustering of errors.