[R-sig-ME] [R] understanding I() in lmer formula
Emmanuel Curis
emmanuel.curis at parisdescartes.fr
Wed Jun 14 23:02:14 CEST 2017
A tentative explaination for the correlated versus uncorrelated...
You want to understand with your ouctome/predicted variable/dependant
variable/explained variable (choose the vocabulary you're the most
familiar with) — here, Reaction — takes different values. A possible
explaination is that it changes (linearly) with Day — so you take the
model Reaction = a + b * Reaction.
Measures are made on units of a population — here, Subject — for which
you may suspect that this linear relation is different. In other
word, each Subject has its own slope (b) and intercept (a).
Because Subject is sampled in a bigger population, taking a new
subject will give new values of a and b, so you will consider the a
and b values for the subjects you have has a (random) sample taken
from a population, that is as random effects. You may encounter other
explainations for this depending on the books you have, but the result
is the same: a and b for each subject are realisations of a random
couple (A, B).
Since you have two random variables, A and B, the question arises
immediatly: are A and B independant (that is, knowing what is the
value taken by A does not give any information about what value will
take B, and reciprocally) or not (knowing what value took A gives an
insight about B — for instance, knowing that A is small means you have
greatest lucks to have negative B, or whatever you can imagine). In
other words, are the slope and the intercept completely unrelated, or
can you somehow predict the intercept when knowing the slope? For a
given Subject, if you know its intercept (A), can you expect that it
has "preferential" values of slope (B) that you couldn't guess
otherwise?
In the usual mixed effects framework, (A, B) is assumed to be
Gaussian (« normal »). So, dependance and correlation are equivalent
— this a special property of Gaussian distributions. So you can read
"uncorrelated" as "independant" (this is the (Day||Subject) model, that
can also be wroten as (1|Subject) + (0+Day|Subject) ) and
"correlated" as "dependant" (this the (Day|Subject) model, that can
also be wroten as (1+Day|Subject).
If you know covariance matrices, "uncorrelated" means that the
covariance matrix of the (A, B) vector is diagonal; "correlated", that
it is not.
I hope this helps,
Best regards,
On Wed, Jun 14, 2017 at 04:23:11PM +0000, Don Cohen wrote:
« 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.
«
« _______________________________________________
« R-sig-mixed-models at r-project.org mailing list
« https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
--
Emmanuel CURIS
emmanuel.curis at parisdescartes.fr
Page WWW: http://emmanuel.curis.online.fr/index.html
More information about the R-sig-mixed-models
mailing list