# Seeking textbook reference for 2 way chi square tests for main effects and interaction

I seek a textbook example of the application of chi square tests for main effects and interaction for categorical data, as in a 2x6 table. I plan to use this to help me be sure I can correctly use CTABLES in SPSS.

• I’ve made an assumption that you know how to F-test analogously in the case of linear regression. Please say if that part is unclear, because my answer will not make sense until that is clear.
– Dave
Feb 2, 2022 at 1:47

A $$\chi^2$$ test is a score test of nested (multinomial) logistic regression models, one of which just has an intercept and the other of which has a categorical predictor (much like ANOVA is a Wald test of nested linear regression models).

Consequently, if you want to extend this to something like two-way ANOVA with an interaction, you would do a (multinomial) logistic regression with multiple predictors. Then test the parameters with score tests, or “chunk” test to test multiple parameters at once (probably what you want if you have multiple levels in your factor variables).

R has a package that will do the score test for you if you know which regression models to pass in (totally analogous to F-testing nested models on linear regression). If you use another software, it likely has analogous functions.

References

Agresti, Alan. Foundations of linear and generalized linear models. John Wiley & Sons, 2015.

Agresti, Alan. Categorical data analysis. John Wiley & Sons, 2003.

• My understanding of ANOVA is that there are estimates of variance due to main effects and interaction effect(s) and associated error variances used to test these effects. I am unfamiliar with "nested (multinomial) logistic regression models". Additional explanation would be appreciated. Feb 2, 2022 at 16:36
• @JoelW. Let's start with this: if you had to do two-way testing with interactions for a linear model, how would you do it? ("I don't know," is an acceptable answer.)
– Dave
Feb 2, 2022 at 17:04
• I would use SPSS to run a 2 way ANOVA, specifying which independent variables is random or fixed. I would look at the table that shows mean squares, degrees of freedom, and significance values for main effects and interaction effects to see which are significant. I would inspect plots of the means. I would also look at the effect sizes for these effects. I may look further, but this is where I would start. Feb 3, 2022 at 18:05
• Hmm. You asked me a question and I responded but I have yet to hear back from you. Why? Feb 6, 2022 at 22:52
• @JoelW. I can’t comment on SPSS, but the R package I linked will do whatever “chunk” test you want. (Remember that ANOVA is one kind of chunk test.)
– Dave
Feb 6, 2022 at 23:45