I am a bit confused by this part of your want: "chi-sq test between (TEETHGUM_DICH=1 + MADV=1) and (TEETHGUM_DICH=1 and MADV=0)."
Your output does not show any value of MADV=0.
Chi-sqr is basically a test of distribution. When you have var1*var2 the chi-sqr statistic reports basically are the observed counts close to the expected (not a significant difference) or not (significant difference) based on the row and column total counts.
So there is no "this point vs that point" with chi-sq.
To get the crosstab output into a data set use: ods output crosstabs= mycrosstabdataset;
To get the Chi-sqr results into a data set use: ods output chisqr= mychisqrdataset;
or which ever libname.data set you want instead of the mycrosstabdataset.
Sorry, I meant MADV=1 vs MADV=2.
I may be using 'chi sq' incorrectly, but I want to test the difference between proportions of MADV=1 and MADV=2 populations meeting the TEETHGUM_DICH outcome.
This is a better representation of what I am trying to test -- based on the frequencies, is there a significant difference between MADV=1 and MADV=2 in the proportion of people meeting TEETHGUM_DICH=1?
I believe that PROC SURVEYLOGISTIC can compare these two percents, using the LSMEANS statement or the SLICE statement.
Hi Paige. Any advice about how to set that up? What statistics am I looking for?
After I posted the comment about SURVEYLOGISTIC, I realized that SURVEYLOGISTIC would compare the LSMEANS (based upon a fitted model) and would not compare the actual means (percents) that you show. So upon further thought, it doesn't seem like SURVEYLOGISTIC is the right tool here. Now maybe you would consider changing your needs and compare the fitted percents, but you haven't said that's what you want.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.