[R-lang] lmer for by item and by subject analysis

Roger Levy rlevy at ling.ucsd.edu
Fri May 9 13:18:21 PDT 2008


Hi Tine,

Tine Mooshammer wrote:
> 
>>
>> hi Tine,
>>
>>> The lmer works well for the simple model:
>>> RTE.lmer=lmer(logAc ~ structure + (1|sp) + (1|code2), latrmE)
>>
>> Could you show us the output of this model?
> yes, sure:
> 
> Linear mixed-effects model fit by REML
> Formula: logAc ~ structure + (1 | sp) + (1 | code2)
>   Data: latrmE
>  AIC    BIC logLik MLdeviance REMLdeviance
> -489 -459.2  251.5       -524         -503
> Random effects:
> Groups   Name        Variance  Std.Dev.
> code2    (Intercept) 0.0069926 0.083622
> sp       (Intercept) 0.0454584 0.213210
> Residual             0.0164155 0.128123
> number of obs: 520, groups: code2, 26; sp, 20
> 
> Fixed effects:
>              Estimate Std. Error t value
> (Intercept)    5.64618    0.06193   91.17
> structureCV   -0.12430    0.05590   -2.22
> structureCVC  -0.09259    0.05039   -1.84
> structureCCV  -0.39861    0.05930   -6.72
> structureCCVC -0.37137    0.05930   -6.26
> 
> Correlation of Fixed Effects:
>            (Intr) strcCV strCVC strCCV
> structureCV -0.451                    structurCVC -0.501  
> 0.555             structurCCV -0.426  0.471  0.523      structrCCVC 
> -0.426  0.471  0.523  0.444
> 
> For model 1+structure|sp
> Linear mixed-effects model fit by REML
> Formula: logAc ~ structure + (1 + structure | sp) + (1 | code2)
>   Data: latrmE
>    AIC  BIC logLik MLdeviance REMLdeviance
> -486.3 -397  264.2     -549.4       -528.3
> Random effects:
> Groups   Name          Variance  Std.Dev. Corr                       
> code2    (Intercept)   0.0070048 0.083695                            
> sp       (Intercept)   0.0374311 0.193471                            
>          structureCV   0.0030771 0.055472 -0.348                     
>          structureCVC  0.0100272 0.100136 -0.348  0.812              
>          structureCCV  0.0014262 0.037765 -0.298  0.632  0.955       
>          structureCCVC 0.0088162 0.093895 -0.298  0.632  0.955  1.000
> Residual               0.0147228 0.121338                            
> number of obs: 520, groups: code2, 26; sp, 20

I believe that the correlation coefficient for the random effects of 
structureCCVC and structureCCV is an indication that you have an 
overspecified random effects structure.  But I think you might want to 
try using the development version -- see the following R-sig-ME email 
for installation information:

   https://stat.ethz.ch/pipermail/r-sig-mixed-models/2007q4/000427.html

This newer version handles the estimation of very small random effects 
structures much better than the version 0.99875-9 that you're using.  If 
you try it, let us know how it works!

Best & good luck!

Roger

-- 

Roger Levy                      Email: rlevy at ling.ucsd.edu
Assistant Professor             Phone: 858-534-7219
Department of Linguistics       Fax:   858-534-4789
UC San Diego                    Web:   http://ling.ucsd.edu/~rlevy



More information about the R-lang mailing list