[R] different F test in drop1 and anova
Tom Van Dooren
vdooren at rulsfb.leidenuniv.nl
Thu Oct 20 11:25:51 CEST 2005
Hi,
I was wondering why anova() and drop1() give different tail
probabilities for F tests.
I guess overdispersion is calculated differently in the following
example, but why?
Thanks for any advice,
Tom
For example:
> x<-c(2,3,4,5,6)
> y<-c(0,1,0,0,1)
> b1<-glm(y~x,binomial)
> b2<-glm(y~1,binomial)
> drop1(b1,test="F")
Single term deletions
Model:
y ~ x
Df Deviance AIC F value Pr(F)
<none> 6.3024 10.3024
x 1 6.7301 8.7301 0.2036 0.6824
Warning message:
F test assumes quasibinomial family in: drop1.glm(b1, test = "F")
> anova(b2,b1,test="F")
Analysis of Deviance Table
Model 1: y ~ 1
Model 2: y ~ x
Resid. Df Resid. Dev Df Deviance F Pr(>F)
1 4 6.7301
2 3 6.3024 1 0.4277 0.4277 0.5131
>
More information about the R-help
mailing list