Skip to content
Prev 806 / 20628 Next

random effects specification

On Tue, Apr 8, 2008 at 8:13 PM, Sebastian P. Luque <spluque at gmail.com> wrote:
A            B
a 18.78058 18.74912
b 19.11358 18.38756
c 18.79208 18.73067
d 19.10998 18.40533
...
Fixed effects:
                      Estimate Std. Error t value
(Intercept)           18.78058    0.01784  1052.7
communityB            -0.03146    0.02523    -1.2
treatmentb             0.33300    0.02523    13.2
treatmentc             0.01150    0.02523     0.5
treatmentd             0.32939    0.02523    13.1
communityB:treatmentb -0.69456    0.03568   -19.5
communityB:treatmentc -0.02995    0.03568    -0.8
communityB:treatmentd -0.67318    0.03568   -18.9

You can reconstruct the table of means from the coefficients:
                      A                                                   B
a :  intercept                               intercept + communityB
b:   intercept + treatmentb          intercept + treatmentb +
communityB + communityB:treatmentb
c:   intercept + treatmentc          intercept + treatmentc +
communityB + communityB:treatmentc
d:   intercept + treatmentd          intercept + treatmentd +
communityB + communityB:treatmentd

This is a consequence of the default treatment contrasts associated
with factors as attributes.
b c d
a 0 0 0
b 1 0 0
c 0 1 0
d 0 0 1
B
A 0
B 1

You can change the default, that is specify your own contrasts as
factor attributes most flexibly via C (see ?C). lmer uses the factor
attribute (like, e.g.,  lm and other programs) and provides test
statistics for each of the contrasts (and their products).

Best
Reinhold