1

I am trying to run a fixed effects logit-regression in R using glm() as follows

glm(binary_outcome ~ as.factor(region)*as.factor(birth_cohort) + as.factor(region)*as.factor(gender)+as.factor(birth_cohort)*as.factor(gender)+treated:as.factor(gender)-1, data, family = "binomial")

This gives the following error

"Warning message: glm.fit: algorithm did not converge"

Also, in other contexts, if I get something similar to run, the estimates don't make sense and the standard errors are huge (in the order of 10+e8).

I suspect the problem is multicollinearity, so I am wondering, if glm() knows, how to normalize the fixed effects regression, since this obviously needs normalizations. If not, is there a simple way to specify it?

spellard
  • 21
  • 2
  • 2
    with all those factor interactions you're probably running into a [seperation](https://en.wikipedia.org/wiki/Separation_(statistics)) problem. you could try firth logistic regression with the package `logistf` or a bayesian logistic regression with `rstanarm` or `brms` – gfgm Mar 16 '21 at 13:04
  • My outcome variable is a binary indicator for high school education, and the regions I am considering are relatively large geographical areas. I would expect there to be both high school educated as well as not high school educated people in every region, in every birth cohort and for both genders. So I'd think separation should not be an issue. That being said, the behavior of the estimates and standard errors is very much like in the case of separation, which I find somewhat puzzling. – spellard Mar 16 '21 at 14:10

0 Answers0