John Sorkin
2009-Sep-07 19:54 UTC
[R] Omnibus test for main effects in the face of an interaction containing the main effects.
R 2.9.1
Windows XP
I am fitting a random effects ANOVA with two factors Group which has two levels
and Time which has three levels:
fita<-lme(Post~Time+factor(Group)+factor(Group)*Time,
random=~1|SS,data=blah$alldata)
I want to get the omnibus significance tests for each factor and the
interaction. I believe I can get the omnibus test for the interaction by running
the model:
fitb<-lme(Post~Time+factor(Group), random=~1|SS,data=blah$alldata)
followed by
anova(fita,fitb).
How do I get the omnibus test for the main effects i.e. for Time and
factor(Group)? I could drop each from the model, i.e.
fitc<-lme(Post~ factor(Group)+factor(Group)*Time,
random=~1|SS,data=blah$alldata)
fitd<-lme(Post~Time+ factor(Group)*Time,
random=~1|SS,data=blah$alldata)
and then run
anova(fita,fitc)
anova(fita,fitd)
but I don't like this option as it will have in interaction that contains a
factor that is not included in the model as a main effect. How then do I get the
omnibus test for Time and factor(Group)?
Thanks
John
John David Sorkin M.D., Ph.D.
Chief, Biostatistics and Informatics
University of Maryland School of Medicine Division of Gerontology
Baltimore VA Medical Center
10 North Greene Street
GRECC (BT/18/GR)
Baltimore, MD 21201-1524
(Phone) 410-605-7119
(Fax) 410-605-7913 (Please call phone number above prior to faxing)
Confidentiality Statement:
This email message, including any attachments, is for th...{{dropped:6}}
John Sorkin
2009-Sep-07 19:59 UTC
[R] Omnibus test for main effects in the face of an interaction containing the main effects.
R 2.9.1
Windows XP
UPDATE,
Even my first suggestion
anova(fita,fitb) is probably not appropriate as the fixed effects are different
in the two model, so I don't even know how to perform the ombnibus test for
the interaction!
I am fitting a random effects ANOVA with two factors Group which has two levels
and Time which has three levels:
fita<-lme(Post~Time+factor(Group)+factor(Group)*Time,
random=~1|SS,data=blah$alldata)
I want to get the omnibus significance tests for each factor and the
interaction. I believe I can get the omnibus test for the interaction by running
the model:
fitb<-lme(Post~Time+factor(Group), random=~1|SS,data=blah$alldata)
followed by
anova(fita,fitb).
How do I get the omnibus test for the main effects i.e. for Time and
factor(Group)? I could drop each from the model, i.e.
fitc<-lme(Post~ factor(Group)+factor(Group)*Time,
random=~1|SS,data=blah$alldata)
fitd<-lme(Post~Time+ factor(Group)*Time,
random=~1|SS,data=blah$alldata)
and then run
anova(fita,fitc)
anova(fita,fitd)
but I don't like this option as it will have in interaction that contains a
factor that is not included in the model as a main effect. How then do I get the
omnibus test for Time and factor(Group)?
Thanks
John
John David Sorkin M.D., Ph.D.
Chief, Biostatistics and Informatics
University of Maryland School of Medicine Division of Gerontology
Baltimore VA Medical Center
10 North Greene Street
GRECC (BT/18/GR)
Baltimore, MD 21201-1524
(Phone) 410-605-7119
(Fax) 410-605-7913 (Please call phone number above prior to faxing)
Confidentiality Statement:
This email message, including any attachments, is for th...{{dropped:6}}