Skip to content
Prev 15517 / 20628 Next

understanding I() in lmer formula

Related to your second question about ||, I believe || is shorthand for
uncorrelating the slope and intercept, e.g:
fm3 <- lmer(Reaction~Days+(Days+0|Subject)+(1|Subject),data=sleepstudy)
fm4 <- lmer(Reaction~Days+(1+Days||Subject),data=sleepstudy)

As opposed to:
fm2 <- lmer(Reaction~Days+(Days+1|Subject),data=sleepstudy)
or simply:
fm1 <- lmer(Reaction~Days+(Days|Subject),data=sleepstudy)

Although happy to be corrected by Ben Bolker if there's more complex
examples where this isn't quite right.

Best-
Dan

On Tue, Jun 13, 2017 at 4:42 PM, Andrew Robinson <mensurationist at gmail.com>
wrote: