Skip to content

updating arguments of formulae

2 messages · Moreno Ignazio Coco, Meyners, Michael, LAUSANNE, AppliedMathematics

#
Michael,

Thanks a lot for your reply, I have now understood how to fiddle  
around with the formulae updates...my question (see my previous e-mail  
where I was sketching this problem out) about LME models remains open...
whether:

depM ~ (1 |Sb2) + OS + (1 + OS | Sb2) + VR + (1 + VR | Sb2)

is equivalent to:

depM ~ OS + VR + (1 + OS + VR | Sb2)

and if probably not what is the best approach to it and where I can  
find a kind of guideline/rule of thumb list to build  
"semi-automatically" linear mixed effect models with fixed effects and  
random intercepts/slopes on it.

I am putting in copy the group  you suggested me...

Thanks again,

Moreno

Quoting "Meyners,Michael,LAUSANNE,AppliedMathematics"  
<Michael.Meyners at rdls.nestle.com>:

  
    
#
Moreno,

to my understanding, 

(1) depM ~ OS + VR + (1 + OS + VR | Sb2)
(2) depM ~ OS + VR + (1 |Sb2) + (1 + OS | Sb2) + (1 + VR | Sb2)

will not yield the same results. In (1), you model a random intercept
and slopes for OS and VR once for each group of Sb2. In (2), you model
an intercept, then again an intercept together with a slope for OS, and
then the same once more for VR. If anything, you might want to model the
three random effects as independent, then you should use something like 

(3) depM ~ OS + VR + (1 |Sb2) + (0 + OS | Sb2) + (0 + VR | Sb2)

hence not estimating three random intercepts for each group of Sb2 (as
is done by (2)). I would not know how to build the models
semi-automatically, for me, there are a lot of assumptions in it that I
may or may not justify conceptually or based on the data. There are a
lot of choices, and different people might make different ones at times,
so I doubt that this could be automatized. 

Try to look at 

require(lme4)
vignette("Implementation")

In Section 3 and in particular pages 15-16, you find a similar model to
(3), and there is some motivation why this model was chosen.

I hope that I have not completely misinterpreted lme4 now and hope that
some of the experts in the area will correct me in case.

HTH, Michael