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.