data hw; input h w symm count @@; datalines; 1 1 1 18 1 2 2 28 1 3 3 14 2 1 2 20 2 2 4 51 2 3 5 28 3 1 3 12 3 2 5 25 3 3 6 9 ; proc freq data=hw order=data; weight count; tables h*w / agree; run; data pm; input appr0$ appr6$ count; cards; yes yes 794 yes no 150 no yes 86 no no 570 ; proc freq data=pm; tables appr0*appr6 /agree; weight count; exact mcnemar; run; data table; input A B count @@; datalines; 1 1 22 1 2 2 1 3 2 1 4 0 2 1 5 2 2 7 2 3 14 2 4 0 3 1 0 3 2 2 3 3 36 3 4 0 4 1 0 4 2 1 4 3 17 4 4 10 ; proc freq data=table order=data; weight count; tables A*B / plcorr agree; run; * Bhapkar's test is better than Stuart-Maxwell; * Can perform it in SAS, but non-intuitive; proc catmod data=table; weight count; response marginals; model A * B = _response_ / oneway; repeated carc 2 / _response_= carc; run;