s-news
[Top] [All Lists]

anova and addterm with F-tests in a Poisson GLM

To: s-news@lists.biostat.wustl.edu
Subject: anova and addterm with F-tests in a Poisson GLM
From: Tom Charman <tgc21@cam.ac.uk>
Date: 14 May 2004 11:34:54 +0100

Hi S-listers,

I am looking into the effects of some environmental conditions (temperature, wind speed, etc) on the foraging activity of bumblebees. I?m trying to do this using a Poisson GLM with count of foraging bumblebees as the response and the different environmental conditions as explanatory variables. I have been looking at each environmental condition by adding it to a minimal model and testing the change in deviance with an F-test (the data is slightly over-dispersed). Recently I stumbled on Venables & Ripley?s cunning addterm function in their MASS library which would save me a lot of time. Unfortunately I get slightly different F and P values when I do the test using anova (model1, model2, test = ?F?) and addterm (model1, model2, test = ?F?). The deviances are the same using both methods, its just the F and P values that differ. I?m not sure what I?m doing wrong, or if I?ve got the wrong idea about these functions, and would be really grateful if anyone could give me a clue.

Thanks loads, tom

A madeup example of what I?m doing:
bees<- c(6, 8, 10, 8, 14, 3, 6, 5, 12, 4) temp<- factor(c("hot","hot","hot","hot","hot","cold","cold","cold","cold","cold") ) model1<- glm(bees ~ 1, family = poisson) model2<- glm(bees ~ temp, family = poisson) library (MASS) anova (model1, model2, test = "F")
Analysis of Deviance Table

Response: bees

Terms Resid. Df Resid. Dev Test Df Deviance F Value Pr(F) 1 1 9 14.62530 2 temp 8 11.23154 1 3.393755 2.201395 0.1761781

addterm (model1, model2, test = "F")
Single term additions

Model:
bees ~ 1
Df Deviance AIC F value Pr(F) <none> 14.62530 16.62530 temp 1 11.23154 15.23154 2.417303 0.1586095



<Prev in Thread] Current Thread [Next in Thread>