[R] significance for a random effect in Mixed Model ANOVA
joris.dewolf at cropdesign.com
joris.dewolf at cropdesign.com
Mon Oct 15 08:55:56 CEST 2007
Nathaniel,
If you are interested in the particular subject, you should consider them
as a fixed effect, which wil give you what you want.
If your subjects are really random, the only thing you could be interested
in, is whether considering the subjects as a grouping is helping you in
improving your model. The logical way is to compare two models, one with
and one without Subject, and compare their loglikelihood with the usual
anova() function.
Joris
"Nathaniel
Street"
<nathaniel.street To
@plantphys.umu.se r-help at r-project.org
> cc
Sent by:
r-help-bounces at r- Subject
project.org [R] significance for a random
effect in Mixed Model ANOVA
14/10/2007 23:48
Please respond to
nathaniel.street@
plantphys.umu.se
In a number of cases I want to use mixed-model ANOVA tests where I am
interested in whether both the fixed and random effects (and their
interactions) are significant.
If I use this example
>library(nlme)
>data(Orthodont)
>anova(lme(distance ~ age + Sex, data = Orthodont, random = ~ 1))
I get the result
numDF denDF F-value p-value
(Intercept) 1 80 4123.156 <.0001
age 1 80 114.838 <.0001
Sex 1 25 9.292 0.0054
How do I also get a significance value for the random factor (Subject)?
Incidentally, why does it seem that people are not generally interested in
whether the random variables are different from each other? In the case of
the Orthodont data (if there was replication at the Subject level i.e. if
you could clone humans [as you can plants]), would it not be interesting
to know if subjects (nested within sex) are different to each other as
well as
if there is an age effect (so to know if underlying genotype is also an
important factor)?
Thanks
Nat Street
--
Nathaniel Street
Umeå Plant Science Centre
Department of Plant Physiology
University of Umeå
SE-901 87 Umeå
SWEDEN
email: nathaniel.street at plantphys.umu.se
tel: +46-90-786 5477
fax: +46-90-786 6676
www.upsc.se
http://www.citeulike.org/user/natstreet
______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list