I am trying to compare proportion of groups with MADV=1 or MADV=2 meeting an outcome (TEETHGUM_DICH=1). I want to do this separately for age groups (AGE_DICH), which is why I've set this up as a three-way comparison. However, I can't figure out how to code this to get a chi-sq test between (TEETHGUM_DICH=1 + MADV=1) and (TEETHGUM_DICH=1 and MADV=2). I want to use ODS to shape the output so getting that ChiSq output in the same row would be really helpful. Code I am using, with a photo of output and the desired numbers to test between. Please let me know if you have any advice -- thanks! proc surveyfreq data=dental_final method=brr(fay=0.3); title 'Weighted / Unweighted n'; weight ER_EEYRSWGT; repweight ER_EEYRS1--ER_EEYRS100; table age_dich*madv*teethgum_dich / chisq; where ER_EEYRSWGT NE .; run;
... View more