Hello R Users, I am investigating the basic use of the LME function, using the following example; Response is Weight, covariate is Age, random factor is Genotype model.lme <- lme (Weight~Age, random=~ 1|Genotype) After summary(model.lme), I find that the estimate of Age is 0.098 with p=0.758. I am comparing the above model with the AOV function; model.aov <- aov (Weight~Age + Genotype) I find that the estimate of Age is also 0.098, and p=0.758 as in the LME model above. So, my questions are; 1: I expected that the LME model would be a better way to analyse this data compared to the AOV model, since Genotype is a random factor. However, I obtain the same parameter estimate and p value for Age. Please can someone tell me why? 2: When using LME, when I am after a p value for the covariate Age, is it better to do the following; Model.lme2 <- lme (Weight~Age, random=~ 1|Genotype, method="ML") Model.lme3 <- lme (Weight~1, random=~ 1|Genotype, method="ML") Anova(Model.lme2, Model.lme3) Giving likelihood ratio=0.102, with p=0.749, which is slightly different to the p values of 0.758 above. Thanks for your attention, Martin. Martin Hoyle, School of Life and Environmental Sciences, University of Nottingham, University Park, Nottingham, NG7 2RD, UK Webpage: http://myprofile.cos.com/martinhoyle
Basic LME
3 messages · Martin Hoyle, Christian Ritz, Peter Dalgaard
Martin Hoyle <plxmh at nottingham.ac.uk> said:
Hello R Users, I am investigating the basic use of the LME function, using the following
example;
Response is Weight, covariate is Age, random factor is Genotype model.lme <- lme (Weight~Age, random=~ 1|Genotype) After summary(model.lme), I find that the estimate of Age is 0.098 with
p=0.758.
I am comparing the above model with the AOV function; model.aov <- aov (Weight~Age + Genotype) I find that the estimate of Age is also 0.098, and p=0.758 as in the LME
model above. Have a look at summary(model.lme), find the "Random Effect:"-part and see whether the Genotype variation is close to 0. If so, this would explain why the estimates are similar, as the random factor Genotype then has almost negligible variation. Pinheiro, J. C. and Bates, D. M. (2000): "Mixed-Effects Models in S and S- PLUS" discuss the merits of the different tests. Christian
<ritz at dina.kvl.dk> writes:
Martin Hoyle <plxmh at nottingham.ac.uk> said:
Hello R Users, I am investigating the basic use of the LME function, using the following
example;
Response is Weight, covariate is Age, random factor is Genotype model.lme <- lme (Weight~Age, random=~ 1|Genotype) After summary(model.lme), I find that the estimate of Age is 0.098 with
p=0.758.
I am comparing the above model with the AOV function; model.aov <- aov (Weight~Age + Genotype) I find that the estimate of Age is also 0.098, and p=0.758 as in the LME
model above. Have a look at summary(model.lme), find the "Random Effect:"-part and see whether the Genotype variation is close to 0. If so, this would explain why the estimates are similar, as the random factor Genotype then has almost negligible variation.
And, as Brian pointed out (and I'm sure you already know), the distinctions disappear in an orthogonal design. If the same ages are recorded for all Genotypes, you get the same results whether you use lme, lm, aov, or aov with an Error(Genotype) term. Perhaps except for the DF calculation in lme, but this might be a case it can get right.
O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907