I am trying to use the Python statsmodels linear mixed effects model to fit a model that has two random intercepts, e.g. two groups. I cannot figure out how to initialize the m
Multiple or crossed random intercepts crossed effects can be fit using variance components, which are implemented in a different way from the one-group mixed effects.
I don't find an example, and the documentation seems to be only partially updated.
The unit tests contain an example using the MixedLM formula interface:
https://github.com/statsmodels/statsmodels/blob/master/statsmodels/regression/tests/test_lme.py#L284