Skip to content
Prev 10957 / 20628 Next

equality constraints in lmer/lme4

No, think about the algebra, if we start with:

y = b0 + b1*x1 + b2*x2 + ...

then the constraint that b1 = b2 gives us:

y = b0 + b1*x1 + b1*x2 + ...

then factoring:

y = b0 + b1*(x1 + x2) + ...

Or we can demonstrate with a basic simulation example (here the true
common slope is 2):
Call:
lm(formula = y ~ x1 + x2)

Coefficients:
(Intercept)           x1           x2
     -1.862        2.034        2.015
Call:
lm(formula = y ~ I(x1 + x2))

Coefficients:
(Intercept)   I(x1 + x2)
     -2.282        2.021
Call:
lm(formula = y ~ I((x1 + x2)/2))

Coefficients:
   (Intercept)  I((x1 + x2)/2)
        -2.282           4.041

So you can see the averaging is not needed (or you could average, but
then you would need to multiply by 2 because we are going to make
predictions based on b1*x1+b1*x2, so the 2's would cancel).

This is just linear regression, but the concept should hold for lme as
well (if you want more convincing, simulate an lme style problem and
try it).
On Mon, Oct 21, 2013 at 1:46 PM, David Winsemius <dwinsemius at comcast.net> wrote: