Skip to content

Overall model significance for poisson GLM

3 messages · Pat Wilkins, Bert Gunter, Ben Bolker

#
Not really an R question. Post on a statistics site like
http://stats.stackexchange.com/

-- Bert
On Mon, Apr 9, 2012 at 9:51 AM, Pat Wilkins <pwilkin2 at illinois.edu> wrote:

  
    
#
Pat Wilkins <pwilkin2 <at> illinois.edu> writes:
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)