[R-sig-ME] meaning of lmer formula
bbolker at gmail.com
Thu Sep 7 04:07:53 CEST 2017
On 17-09-06 05:17 PM, Don Cohen wrote:
> Ben Bolker writes:
> > > Does (input1 + input2 | group) mean the same as
> > > (input1 | group) + (input2 | group) or does it also include a
> > > correlation between input1 and input2 ?
> > The latter.
> It occurred to me after I wrote the questions that
> (input1 | group) + (input2 | group) might also include that
> correlation between input1 and input2 - I gather now it does not.
It does not. Separate terms in lme4 formulas are always independent.
(input1|group) + (input2|group) is problematic because both terms
include an intercept. (0+input2|group) can be helpful, but doesn't do
what you think when the variable on the LHS (e.g. input2) is a factor.
> > > Back to my question about additive shifts, is that extra correlation
> > > required in order to maintain invariance over additive shifts?
> > Yes.
> One more question (so far):
> If there are two different groupings, would
> (input1 + input2 | group1) + (input1 + input2 | group2)
> involve correlations between group1 and group2 ?
> If I think of (1+input1 | group) as a 2x2 matrix, and
> (1+input1+input2 | group) as 3x3
> then is (1+input1+input2 | group1)+(1+input1+input2 | group2)
> two independent 3x3's or a full 6x6 (or something else) ?
If input1 and input2 are both numeric (or 2-level factors) then they're
two independent 3x3s.
More information about the R-sig-mixed-models