*-- SAS 9.3 ---; %include catdata(sexfun); *-- general Chisq test; proc freq data=sexfun; weight count; tables husband * wife / chisq plots=all; run; *-- CMH tests; proc freq data=sexfun order=data; weight count; tables husband * wife / cmh chisq nocol norow; run; *-- exact test; proc freq data=sexfun order=data; weight count; tables husband * wife / exact nocol norow; run; *-- correlation of ratings; proc corr data=sexfun ; weight count; var husband wife; run;