0

When specifying random slopes in a mixed model in R I've seen some people write (1 + main effect|random variable), while others write (main effect|random variable) without the 1 +. For instance in this question and answer they seem to be used interchangeably: Questions about how random effects are specified in lmer

I can't find any explanation of what the 1+ is doing?

The same question and answer linked above says that to specify a random slope with no random intercept you put (main effect - 1|random variable), so it can't be that, which would have been my guess.

Ellen
  • 21
  • 4
  • I think it's probably just meant to be explicitly declaring a random intercept, to make the model specification easier to read. You can see that `lmer(Reaction ~ (1 + Days | Subject), sleepstudy)` and `lmer(Reaction ~ (Days | Subject), sleepstudy)` produce the same result – alan ocallaghan Jan 06 '22 at 12:19

0 Answers0