[R] Omnibus test for main effects in the face ofaninteraction containing the main effects.

Ben Bolker bolker at ufl.edu
Tue Sep 8 04:14:10 CEST 2009




John Sorkin wrote:
> 
> Daniel,
> When Group is entered as a factor, and the factor has two levels, the
> ANOVA table gives a p value for each level of the factor. What I am
> looking for is the omnibus p value for the factor, i.e. the test that
> the factor (with all its levels) improves the prediction of the outcome.
> 
> You are correct that normally one could rely on the fact that the model 
> Post<-Time+as.factor(Group)+as.factor(Group)*Time
> contains the model 
> Post<-Time+as.factor(Group)
> and compare the two models using anova(model1,model2). However, my model
> is has a random effect, the comparison is not so easy. The REML
> compari[s]ons of nested random effects models is not valid when the fixed
> effects are not the same in the models, which is the essence of the
> problem in my case. 
> 

 So why not use ML comparisons if this is what you want to do ... ?



> In addition to the REML problem if one wants to perform an omnibus test
> for Group, one would want to compare nested models, one containing
> Group, and the other not containing group. This would suggest comparing
> Post<-Time+      as.factor(Group)*Time to
> Post<-Time+Group+as.factor(Group)*Time
> The quand[a]ry here is whether one should or not "allow" the first model
> as
> it is poorly specified - one term of the interaction,
> as.factor(Group)*Time, as.factor(Group) does not appear as a main effect
> - a no-no in model building. 
> John
> 

Agreed. I don't think the question makes sense -- "the overall effect of
group"
includes both the main effect & the interaction.
(re) reading

Venables, W. N. “Exegeses on Linear Models.” 1998 International S-PLUS User
Conference. Washington, DC, 1998.
http://www.stats.ox.ac.uk/pub/MASS3/Exegeses.pdf.

might be useful ...

-- 
View this message in context: http://www.nabble.com/Re%3A-Omnibus-test-for-main-effects-in-the-face%09ofaninteraction%09containing-the-main-effects.-tp25338728p25338952.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list