proc format; value tc 1='Placebo' 2='Aspirin'; value oc 1='Fatal' 2='Nonfatal'; run; data table; input Treatment Outcome count @@; datalines; 1 1 18 1 2 171 2 1 5 2 2 99 ; run; proc freq order=data; weight count; format Treatment tc. Outcome $oc.; tables Treatment*Outcome / norow nocol nopercent expected; exact chisq or; run; proc genmod order=data; class Treatment Outcome; model count = Treatment Outcome Treatment*Outcome / dist=poi; run;