Sorry, that was a typo in the email, not the model. So I still have the
problem.....
Cheers, Simon.
----- Original Message -----
From: "Ted Harding" <ted.hard...@manchester.ac.uk>
To: "Simon Pickett" <simon.pick...@bto.org>; <r-help@r-project.org>
Sent: Thursday, February 19, 2009 10:56 AM
Subject: RE: [R] type III effect from glm()
On 19-Feb-09 10:38:50, Simon Pickett wrote:
Hi all,
This could be naivety/stupidity on my part rather than a problem
with model output, but here goes....
I have fitted a fairly simple model
m1<-glm(count~siteall+yrs+yrs:district,family=quasipoisson,
weights=weight,data=m[x[[i]],])
I want to know if yrs (a continuous variable) has a significant
unique effect in the model, so I fit a simplified model with the
main effect ommitted...
m2<-glm(count~siteall+yrs:district,family=quasipoisson,
weights=weight,data=m[x[[i]],])
So, above, you have fitted two models: m1, m2
then compare models using anova()
anova(m1,m2,test="F")
And here you are comparing two models: m1, m1b
Could this be the reason for your result?
Analysis of Deviance Table
Model 1: count ~ siteall + yrs + yrs:district
Model 2: count ~ siteall + yrs:district
Resid. Df Resid. Dev Df Deviance F Pr(>F)
1 1936 75913
2 1936 75913 0 0
The d.f.'s are exactly the same, is this right? Can I only test the
significance of a main effect when it is not in an interaction?
Thanks in advance,
Simon.
--------------------------------------------------------------------
E-Mail: (Ted Harding) <ted.hard...@manchester.ac.uk>
Fax-to-email: +44 (0)870 094 0861
Date: 19-Feb-09 Time: 10:56:12
------------------------------ XFMail ------------------------------
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.