[R] lmer: Interpreting random effects contrasts and model formulation

scott rifkin sarifkin at MIT.EDU
Thu Dec 28 22:05:12 CET 2006


I'm trying to fit a nested mixed model using lmer and have some 
questions about the output and my model formulations.

I have replicate measures on Lines which are strictly nested within 
Populations.

(a) So if I want to fit a model where Line is a random effect and 
Populations are fixed and the random Line effect is constant across 
Populations, I have:
measure_ijk = mu + P_i + L_ij + e_ijk where L ~ N(0,s_L)
measure ~ 1 + Population + (1|Population:Line)

(b) If instead I want to allow the random Line effect to be Population 
specific, I put:
measure_ijk = mu + P_i + L_ij + e_ijk where L_i ~ N(0,s_L_i)
measure ~ 1 + Population + (Population | Population:Line)

(c) Question 1:  if instead, I put:
measure ~ 1 + Population + (1 | Population:Line) + (Population | 
Population:Line)
would the model be:
measure_ijk = mu + P_i + L_ij + e_ijk where L_i ~ N(0,s_L_i)+N(0,s_L) ?

(d) Question 2:  in (b) above, the part of the output from 
summary(model) corresponding to (Population | Population:Line) is:

Random effects:
 Groups   Name        Variance   Std.Dev. Corr
 pop:line (Intercept) 52.1214951 7.219522
          popP1       39.5706524 6.290521 0.995
          popP2       24.8629456 4.986276 0.994 0.986
          popP3        0.6350483 0.796899 0.993 0.985 0.982
          popP4        1.4422308 1.200929 0.992 0.986 0.985 0.980
 Residual              0.0025377 0.050375

How do I interpret these contrasts?  If it were fixed effects, it would 
be treatment contrasts which I understand.  Is it a similar thing here 
where the Variance of 39.57 for popP1 is actually:
Variance(popP0 - popP1) = Variance(popP0) + Variance(popP1) - 
2*Corr(popP0,popP1)*StdDev(popP0)*StdDev(popP1)
=> 39.57 = 52.12 + StdDev(popP1)^2 - 2*0.995*7.219522*StdDev(popP1)

(e) Question 3:  For the model (c), there is another line at the top of 
the results with the intercept corresponding to (1|Population:Line). 

Random effects:
 Groups   Name        Variance   Std.Dev. Corr
 pop:line (Intercept)  3.2490952 1.802525
 pop:line (Intercept) 47.1995788 6.870195
e          popP1       44.6401379 6.681328 0.995
          popP2       34.1298102 5.842072 0.994 0.980
          popP3        0.8056185 0.897563 0.991 0.983 0.983
          popP4        2.5663700 1.601989 0.993 0.985 0.985 0.983
 Residual              0.0025374 0.050372

How does this play into the estimates? (I suspect this will become clear 
when I understand the answer to question d)

Thanks much,
Scott Rifkin



More information about the R-help mailing list