R lmer4 package multilevel model adding random effect with 0 notation

114 views Asked by At

I do not understand what the difference between these two models is ( I am using the lmer4 package)

Model.1<-lmer(Y~ X1+ X2+ X3
          +(1|Subject) + (0+X1|Subject)+ (0+X2|Subject), 
          data=Data, REML=FALSE)

Model.2<-lmer(Y~ X1+ X2+ X3
          +(1|Subject) + (X1|Subject)+ (X2|Subject), 
          data=Data, REML=FALSE)

When I compare these two models, I get different degrees of freedom (with model 1 having less than model 2). But I am not sure what the (0+..) notation does to the random effect, and how I decide on a theoretical level which model to use (other than comparing BIC scores).

1

There are 1 answers

0
Rebecca On

The 0 + notation suppresses the random intercept so it's not estimated in your model. Model.1 does not model correlation between your random intercept, and the random effects of X1 and X2. If you wanted to model correlation between all your random effects, you could do so using (1 + X1 + X2|Subject).