# Why do random effects in a mixed model always have a mean of zero?

I am studying the linear mixed model $y=X\beta + Z\gamma + \epsilon$ where $\beta$ is a vector of fixed effects, and it seems that $\gamma$ is usually specified as $\gamma \sim N(0,I\sigma^2)$.

My question is why does $\gamma$ have a mean of zero?

If I specify $\gamma \sim N(\alpha,I\sigma^2)$, where $\alpha$ is a vector of non-zero constants, then $y=X\beta + Z\alpha + Z\gamma^* + \epsilon$ where $\gamma^* \sim N(0,I\sigma^2)$. Is there anything incoherent with this model, can $Z$ wield both fixed and random effects?

• In general the columns of the $Z$ matrix correspond to some or all of the columns of the $X$ matrix, consequently the non-zero means of the random effects can be found in as fixed effects in $\beta$ – user83346 Sep 15 '16 at 5:39

The mean of $\gamma$ is already played by the intercept. If you include both an intercept and the parameter $\alpha$ ($\gamma \sim N(\alpha, \sigma^2 I)$), then the model will be overparametrised and there will be confounding. The model is said to be non-identifiable.

i.e.

$$y = \alpha + \gamma,\quad \gamma \sim \mathcal N(\color{green}{0}, \sigma^2_\gamma)$$ is the same as $$y = \gamma,\quad \gamma \sim \mathcal N(\color{green}{\alpha}, \sigma^2_\gamma)$$

EDIT: As noted by @fcop in his comment below, the above discussion concerns a random intercept. In the same way, the mean of a random effect is played by the corresponding fixed effect coefficient.

• You can have random effects on slopes also I think ? – user83346 Sep 15 '16 at 8:40
• Similary, the mean of the random effect of the slope is played by the fixed effect of the slope. – ocram Sep 15 '16 at 8:46
• This is what I said in my comment below the question – user83346 Sep 15 '16 at 9:07
• Indeed. I ve just tried to make it more explicit ;-) – ocram Sep 15 '16 at 9:16
• So based on the above discussion, if I don't include the fixed effect term $Z\alpha$ explicitly in the model, then I can have $\gamma \sim N(\alpha,I\sigma^2)$ without the identification issue? – user77873 Sep 22 '16 at 9:57