[R-sig-ME] [R] understanding I() in lmer formula

Don Cohen don-r-help at isis.cs3-inc.com
Wed Jun 14 18:23:11 CEST 2017


Dan Brooks writes:
 > 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)

Saying that it's shorthand for something else would be useful if I
understood what that something else meant!

I gather the formula language is intended to be intuitive, and maybe
it is for people who understand mixed models better than I do, but
to me fm3 and fm4 seem equally mysterious.  The idea that days+1 should
be the same as days and that days+0 should be different from days seems
counter-intuitive to me.

And the distinction between correlated vs uncorrelated also still
has to be explained - I described some of my interpretation 
problems in the previous post.



More information about the R-sig-mixed-models mailing list