2
$\begingroup$

I struggling to understand whether it is possible to have random effect without the respectively fixed effect. For example, I use lme4 to fit two models:

y ~ 1 + (1 + x | z) 

and

y ~ 1 + x + (1 + x | z) 

the random effect for x seems to be the same despite the fact that in the first model, there should be a random effect of z on the slope of x, but x doesn't seem to have a fixed effect (!). What am I missing?

$\endgroup$
3
  • 2
    $\begingroup$ Both models are possible. All random effects have mean zero, so in your first model you constrain the average (across z) effect of x on y to be zero. In the second model the average effect will be given by the fixed effect. $\endgroup$ – amoeba Mar 2 '18 at 11:45
  • $\begingroup$ Thank amoeba. So this means that if the slope for the fixed effect is zero, the two models will be exactly the same? $\endgroup$ – nitzan shahar Mar 2 '18 at 13:33
  • $\begingroup$ Yes, I think so. $\endgroup$ – amoeba Mar 2 '18 at 14:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.