Take this linear mixed effects model, which is discussed on the CMM website: Centre for Multilevel Modelling

$y_{ij} = \beta_0 + \beta_1X_{ij} + \beta_2\bar{X}_j + u_j + e_{ij}$

The variable $X$ is included as both a level 1 and level 2 explanatory variable. The value of $X$ is included for each person $i$ in each group $j$ and it is also included as the mean for each group $j$.

But if $X$ is included as the mean for each group $j$, why would it be necessary to include a random intercept for each group $j$ as well?


marked as duplicate by Firebug, COOLSerdash, John, Peter Flom May 9 '17 at 10:52

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


The inclusion of random intercepts for groups $j$ would appear to be necessary because differences in $\bar{X}_j$ doesn't necessarily explain differences among groups $j$. The inclusion $\bar{X}_j$ can be used to test hypotheses that differences among groups $j$ is due to differences among $\bar{X}_j$.

(note this answer might be entirely incorrect).


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