[R] Overall model significance for poisson GLM

Ben Bolker bbolker at gmail.com
Tue Apr 10 00:25:12 CEST 2012


Pat Wilkins <pwilkin2 <at> illinois.edu> writes:

> 
> Greetings,
> 
> I am running glm models for species counts using a poisson link function.
> Normal summary functions for this provide summary statistics in the form of
> the deviance, AIC, and p-values for individual predictors.  I would like to
> obtain the p-value for the overall model.  So far, I have been using an
> analysis of deviance table to check a model against the null model with the
> intercept as the only predictor.
> 
> Any advice on other methods to obtain the proper p-value would be
> appreciated.
> 

  What you're doing seems reasonable, although you can also dig
the necessary values out of the summary and compute the p-value
yourself:

counts <- c(18,17,15,20,10,20,25,13,12)
outcome <- gl(3,1,9)
treatment <- gl(3,3)
d.AD <- data.frame(treatment, outcome, counts)
glm.D93 <- glm(counts ~ outcome + treatment, family=poisson(), data=d.AD)

## as you have been doing
anova(update(glm.D93,.~1),glm.D93,test="Chisq")
## or
sg1 <- summary(glm.D93)
devdiff <- with(sg1,null.deviance-deviance)
dfdiff <- with(sg1,df.null-df.residual)
pchisq(abs(devdiff),df=dfdiff,lower.tail=FALSE)



More information about the R-help mailing list