[R] Levels of interaction terms between numeric and factor in glm

achilles tsoumanis achillestsoumanis at hotmail.com
Thu Oct 21 19:19:06 CEST 2010


Hello everyone, 

I have been working on a model to describe the counts of a certain event. I
use glm function with Poisson family and log link. the model is:

model<-glm(event~week+year+week:var1+year:var1+year:var2, family=poisson), 

where week and season are factor variables with 52 and 7 levels respectively
and var1 and var2 are numerical variables. 

The model seems to describe well the actual counts of events and it is
reasonable in its structure. 

My problem is how to interpret the coefficients. When I use anova(model,
test="Chisq"), or summary(model)  I see that the degrees of freedom in
variables week and year are 51 and 6 respectively, which makes sense since
the first level is used as a reference. 
The problem is in the interaction terms: week:var1 has 52 degrees of
freedom, year:var1 has 6 and year:var2 has 7 degrees of freedom. 

I am able to interpret the results in week and year coefficients, but not in
the rest of the terms. Why are there differences in the degrees of freedom
in the interaction terms? How could the results be explained?

Any assistance would be valuable.


Thank you in advance


Achilles Tsoumanis
-- 
View this message in context: http://r.789695.n4.nabble.com/Levels-of-interaction-terms-between-numeric-and-factor-in-glm-tp3005967p3005967.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list