I have two generalized linear models
mod1 <- glm(Score ~ Height + Gene, data=mydata, family=binomial) mod2 <- glm(Score ~ Height * Gene, data=mydata, family=binomial)
I want to perform an analysis of deviance to test the significance of the interaction term.
At first I did
anova(mod1,mod2), and I used the function
1 - pchisq() to obtain a p-value for the deviance result I got from the anova table.
I also did another test:
anova(mod2, test="Chisq"). This gave a table for all the terms added sequentially first to last, and I obtained a very different p-value value for the interaction term
Which one should I use?