I am trying to determine if there is an easier way to run post hoc tests for chi-square test of independence. This is a scenario of when chi-square is significant and the explanatory variable has more than 2 levels. I have been using the code below, but it is tedious and my students typically get confused as you have to do the entire code for each comparison you want to make. Data comparison1; set withage; IF hinsur=1 OR hinsur=2; Proc sort; by AID; Proc freq; tables notwanted*hinsur/chisq; Run; Also, I have been exploring using the Tasks and Utilities. I discovered under Statistics and Table Analysis how to test chi-square but I do not see an option to run post hoc tests from any of the menu options. How do I run post hoc tests from Tasks and Utilities? Thank You!
... View more