# Clustered standard errors and multi-level models

Stata allows estimating clustered standard errors in models with fixed effects but not in models random effects? Why is this?

By clustered standard errors, I mean clustering as done by stata's cluster command (and as advocated in Bertrand, Duflo and Mullainathan).

By fixed effects and random effects, I mean varying-intercept. I have not considered varying slope.

• I would consider varying intercept fixed effects, see stata.com/support/faqs/stat/xtreg.html . It probably isn't a bad idea to check out those Stata FAQ's to see if they have anything pertinent to your question as well. Mar 14, 2011 at 23:58
• @Andy The intercept can vary as either a fixed effect or a random effect. In the notation of your link, if it's a fixed effect then $u_i$ is treated as a constant to be estimated from the info within each group, while if it's a random effect it's assumed to have a normal distribution whose mean and variance the model estimates, and you can afterwards get 'predictions' of the individual $u_i$s which use info from all the groups and are closer to their mean than in the fixed effect models due to 'shrinkage'. Mar 15, 2011 at 9:45
• See andrewgelman.com/2007/11/28/clustered_stand See also StasK's answer in stats.stackexchange.com/questions/38419 Feb 2, 2017 at 22:57

## 1 Answer

When you cluster on some observed attribute, you are making a statistical correction to the standard errors to account for some presumed similarity in the distribution of observations within clusters. When you estimate a multi-level model with random effects, you are explicitly modeling that variation, not treating it simply as a nuisance, thus clustering is not needed.

• (+1) I believe that's the overwhelmingly most common situation. Clustered SEs are possible in random-effect models though, and have been considered in the context of meta-analysis / meta-regression. See Hedges, Tipton & Johnson Research Synthesis Methods 2010. Mar 15, 2011 at 9:48
• My understanding from the Bertrand et al. paper is that clustered standard errors also allow for heteroskedasticity at the cluster level... random effects don't address this. This post suggests that clustering is standard practice in fixed effects models for that reason.
– DanB
Mar 15, 2011 at 12:13
• Clustered standard errors can still make sense if there is, for example, hetereoscedasticity beyond the clustering. These standard errors are robust to hetereoscedasticity or autocorrelation of any form which is in general not true for normal standard errors. Imbens and Wooldridge, for example, argue for using always robust standard error on in panel data and random effects. This argument also applies to multilevel models. Dec 20, 2016 at 14:59