[R] Basic LME
Paul, David A
paulda at BATTELLE.ORG
Tue Apr 8 17:48:57 CEST 2003
I'm certainly no expert, but I believe that aov( ) is simply a
front-end to the lm( ) function, which fits fixed-effects linear
models. As you may know, it is possible to write any ANOVA model
as a regression model with appropriate use of indicator variables
for the various levels of treatments.
So, aov( ) does not, in general, yield results that are comparable
to those generated by lme( ). You have specified the same _fixed_
effect ( ~ Age ) in both aov( ) and lme( ) which is why they
give you the same parameter estimates for this covariate.
When you perform anova( ) to compare the two lme( ) models, you
are performing a likelihood ratio test. This is not generally
the same as the F-test/t-test used to evaluate the marginal
significance of a fixed-effect term in a linear model, which explains
the difference between the p-values.
Best,
david paul
-----Original Message-----
From: Martin Hoyle [mailto:plxmh at nottingham.ac.uk]
Sent: Tuesday, April 08, 2003 10:09 AM
To: r-help at stat.math.ethz.ch
Subject: [R] Basic LME
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
______________________________________________
R-help at stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
More information about the R-help
mailing list