Solved – Clustering errors in Panel Data at the ID level and testing its necessity

clustered-standard-errorsfixed-effects-modelstata

What are the possible problems, regarding the estimation of your standard errors, when you cluster the standard errors at the ID level? And how does one test the necessity of clustered errors?

When you have panel data, with an ID for each unit repeating over time, and you run a pooled OLS in Stata, such as:

reg y x1 x2 z1 z2 i.id, cluster(id)

Or a fixed-effects model:

xtreg y x1 x2 z1 z2, fe cluster(id)

How does one test the accuracy of using clustered errors?

Best Answer

Stata provides an estimate of rho in the xtreg output. Rho is the intraclass correlation coefficient, which tells you the percent of variance in the dependent variable that is at the higher level of the data hieracrchy (here the individual). If that value is anywhere north of .01, that's a good indication that you should be concerned about clustering. As for problems, I don't know that there are any.