data contraceptive; input case control count @@; cards; 1 1 10 1 2 57 2 1 13 2 2 95 ; run; proc format; value casefm 1='yes' 2='no'; value controlfm 1='yes' 2='no'; proc freq; weight count; tables case*control/norow nocol nopercent agree; format case casefm. control controlfm.; Title 'Example of McNemars Test'; Title2 'Example 6.19 pp. 209-210 of Fisher & van Belle'; run;