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.

  • 2
    $\begingroup$ 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. $\endgroup$
    – Andy W
    Mar 14, 2011 at 23:58
  • $\begingroup$ @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'. $\endgroup$
    – onestop
    Mar 15, 2011 at 9:45
  • $\begingroup$ See andrewgelman.com/2007/11/28/clustered_stand See also StasK's answer in stats.stackexchange.com/questions/38419 $\endgroup$
    – amoeba
    Feb 2, 2017 at 22:57

1 Answer 1


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
    $\begingroup$ (+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. $\endgroup$
    – onestop
    Mar 15, 2011 at 9:48
  • $\begingroup$ 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. $\endgroup$
    – DanB
    Mar 15, 2011 at 12:13
  • 1
    $\begingroup$ 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. $\endgroup$ Dec 20, 2016 at 14:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.