lincoln
2012-Jun-04 11:00 UTC
[R] Chi square value of anova(binomialglmnull, binomglmmod, test="Chisq")
Hi all, I have done a backward stepwise selection on a full binomial GLM where the response variable is gender. At the end of the selection I have found one model with only one explanatory variable (cohort, factor variable with 10 levels). I want to test the significance of the variable "cohort" that, I believe, is the same as the significance of this selected model:> anova(mod4,update(mod4,~.-cohort),test="Chisq")Analysis of Deviance Table Model 1: site ~ cohort Model 2: site ~ 1 Resid. Df Resid. Dev Df Deviance P(>|Chi|) 1 993 1283.7 2 1002 1368.2 -9 -84.554 2.002e-14 *** --- Signif. codes: 0 ?***? 0.001 ?**? 0.01 ?*? 0.05 ?.? 0.1 ? ? 1 My question is: When I report this result, I would say /"cohorts were unevenly distributed between sites ( Chi2=84.5, df=9, p < 0.001)"/, is that correct? is the Chi2 value the difference of deviance between model with cohort effect and null model? -- View this message in context: http://r.789695.n4.nabble.com/Chi-square-value-of-anova-binomialglmnull-binomglmmod-test-Chisq-tp4632293.html Sent from the R help mailing list archive at Nabble.com.
David Winsemius
2012-Jun-04 15:03 UTC
[R] Chi square value of anova(binomialglmnull, binomglmmod, test="Chisq")
On Jun 4, 2012, at 7:00 AM, lincoln wrote:> Hi all, > > I have done a backward stepwise selection on a full binomial GLM > where the > response variable is gender. > At the end of the selection I have found one model with only one > explanatory > variable (cohort, factor variable with 10 levels). > > I want to test the significance of the variable "cohort" that, I > believe, is > the same as the significance of this selected model: > >> anova(mod4,update(mod4,~.-cohort),test="Chisq") > Analysis of Deviance Table > > Model 1: site ~ cohort > Model 2: site ~ 1 > Resid. Df Resid. Dev Df Deviance P(>|Chi|) > 1 993 1283.7 > 2 1002 1368.2 -9 -84.554 2.002e-14 *** > --- > Signif. codes: 0 ?***? 0.001 ?**? 0.01 ?*? 0.05 ?.? 0.1 ? ? 1 > > My question is: > When I report this result, I would say /"cohorts were unevenly > distributed > between sites ( Chi2=84.5, df=9, p < 0.001)"/, is that correct? is > the Chi2 > value the difference of deviance between model with cohort effect > and null > model?I thought you said the response variable was gender? It seems to be 'site' in these two models. Maybe you should give us some more information about how you constructed 'mod4'? -- David Winsemius, MD West Hartford, CT
Possibly Parallel Threads
- te( ) interactions and AIC model selection with GAM
- lmer specification for random effects: contradictory reults
- strange PREDICTIONS from a PIECEWISE LINEAR (mixed) MODEL
- Automated Fixed Order Stepwise Regression Function
- sem package fails when no of factors increase from 3 to 4