I'm wondering if in the same analysis I can use countries as fixed effect and as a cluster for the robust standard errors.

Background: I'm running a multivariate logistic regression with the glm() package in R. My outcome variable is intimate partner violence and my predictors include income inequality, age, education, under 18y living at home, alcohol abuse, and violent behavior towards others.

My supervisor said I should include clustered robust standard errors in my analysis and I do have 28 countries in my sample, therefore, my cluster is countries. Right now, I'm not very interested in what those differences are.

My idea was to include country as dummy variables to account for country effects in the analysis. But since now I will use country as my cluster for the robust standard errors, I'm no longer sure if I need to use as the country effects as well. Can I use country as both fixed effects and as the cluster for my robust standard errors?

Can someone please help me? Any answer or link to a material would be great.


1 Answer 1


In case of linear models, heteroscedasticity will not affect the point estimates, and you can use clustered standard errors. Whether you should do this or not is discussed, for example, here. This however does not translate for nonlinear models.

Jeff Wooldridge writes for example here:

... The reason clustered standard errors are not allowed is that the FE logit estimator -- that is, the conditional MLE -- is inconsistent in the presence of serial correlation (and heteroskedasticity). A former student of mine [..] showed this in his dissertation via simulation a few years ago.

And you should careful think about the (non-linear) model you are estimating. One pragmatic opportunity could be to use fixed-effects OLS for binary data as often been done in econometrics and suggested for example by Joshua Angrist and Jörn-Steffen Pischke:

Hence, there is a lot to be said for sticking to a linear regression function as compared to a fairly arbitrary choice of a non-linear one! Nonlinearity per se is a red herring.

PS: As commented by Frank Harrell, this approach is however controversial since you use by definition a model which is not suited for the (binary) data at hand (see for example the blogpost by Dave Giles here).

  • 3
    $\begingroup$ Don't fall for the nonsense about using OLS for binary Y. But the rest of your answer is good and is consistent with using a better approach: a random effects model (if serial correlation is not present but you want to take inter-country variation into account, i.e., if a compound symmetry correlation structure works). Nonlinearity is not a red herring. $\endgroup$ Dec 4, 2021 at 15:23
  • $\begingroup$ @Arne Jonas Warnke, I actually found OLS to be very reasonable for my RQ, link. Then turning my question to "when using a OLS model", can I still use both country as fixed effect and to cluster the std. errors? Thank you! $\endgroup$ Dec 4, 2021 at 19:33
  • 1
    $\begingroup$ @AndressaTB yes you can use both fixed-effects and clustered se. Whether you should or not is discussed here: economics.mit.edu/files/13927 $\endgroup$ Dec 5, 2021 at 17:13
  • 1
    $\begingroup$ OLS is simply not appropriate for binary Y. You'll get negative probabilities and probabilities > 1. OLS can only possibly work for very weak models when Y is binary. $\endgroup$ Dec 5, 2021 at 17:35
  • 1
    $\begingroup$ Yes random effects models (nonlinear mixed effects model) would be better. Even better to use a better-behaving Bayesian hierarchical model. If the outcome variable was originally measured on an ordinal scale (which it probably should have been) then it would be better to use a mixed effects ordinal model. There is quite a spectrum of violent acts. $\endgroup$ Dec 6, 2021 at 14:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.