[R-sig-ME] Chisquare=0, p-value=1

Ben Bolker bbolker at gmail.com
Mon Sep 26 22:37:05 CEST 2011


Iker Vaquero Alba <karraspito at ...> writes:

>     Dear list:    I am implementing a model and simplifying it
> step-wise. Everything goes fine until I get the minimum adequate
> model. When I try to simplify one of the main effects and compare
> the model with or without that effect, I get a chisquare value of 0
> and a p of 1:

  I still don't think you should do stepwise simplification, but ...

 This has come up as recently (with a very similar subject line) as
http://article.gmane.org/gmane.comp.lang.r.lme4.devel/6649

> 
> > s.hatchmodel1.106<-update(s.hatchmodel1.103,~.-brithr)
> > anova(s.hatchmodel1.103,s.hatchmodel1.106)
> Data: 
> Models:
> s.hatchmodel1.103: prophatch1 ~ sex + inslarge + tlength +
>  briventral + brithr + 
> s.hatchmodel1.103:     (1 | site/pair) + (1 | year) +
>  sex:brithr + tlength:brithr + 
> s.hatchmodel1.103:     briventral:brithr
> s.hatchmodel1.106: prophatch1 ~ sex + inslarge + tlength + 
> briventral + (1 | site/pair) + 
> s.hatchmodel1.106:     (1 | year) + sex:brithr + 
> tlength:brithr + briventral:brithr
>                   Df     AIC     BIC logLik Chisq Chi Df Pr(>Chisq)
> s.hatchmodel1.103 13 -130.36 -98.915  78.18                        
> s.hatchmodel1.106 13 -130.36 -98.915  78.18     0      0          1
> 

   The problem is that you are dropping a main effect, "brithr",
while at least one interaction with brithr is still in the model.
There are (very) unusual circumstances where it could make sense
to drop a main effect while the interaction was still present,
but R's default way of constructing interactions will guarantee
that the main effect is still implicitly included in the model.
See the thread referenced above.

  Ben Bolker




More information about the R-sig-mixed-models mailing list