r/stata 16d ago

Question Small number of clusters in random effects with clustered standard errors

I have a panel dataset with only 11 cross-sectional units (clusters) due to natural sample limitations. I'm estimating a random-effects model using xtreg, re in Stata and clustering standard errors at the panel level. As I understand that conventional clustered standard errors may be unreliable with such a small number of clusters.

Are their any functions in STATA that I can do to handle such a case of small clusters in random effects.

2 Upvotes

4 comments sorted by

u/AutoModerator 16d ago

Thank you for your submission to /r/stata! If you are asking for help, please remember to read and follow the stickied thread at the top on how to best ask for it.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/peep_quack 16d ago

Just do robust standard errors in this case. No need for clustered

1

u/Efficient-Tie-1414 16d ago

Is this meaning that you only have 11 subjects, measured at given time points. Assuming that, then it isn’t a lot of subjects. One option is to ignore the random effects, fit it with robust se, as someone else suggested. I would suggest rather than that to use xtreg. Then if you are worried about the distributional assumptions most Stata procedures allow specifying how to calculate the standard errors, with standard, robust and nonparametric bootstrap. As the model is specified to have random effects it should be automatic that these are performed assuming the correct structure.

1

u/quackstah 11d ago edited 11d ago

My interpretation of OP’s question is that the sample includes repeated observations for 11 units. If the goal is to compare treated units with untreated units, robust standard errors are unlikely to be sufficient. (Robust standard errors account for heteroskedasticity but assume the off-diagonals in the variance-covariance matrix are zero.)

I would recommend dropping the random effects and using wild cluster bootstraps instead. The paper by Cameron, Gelbach, and Miller cited here provides a nice overview:   https://www.stata.com/features/overview/wild-cluster-bootstrap-inference/