*********************************************************************** * This is a program that illustrates the use of PROC FREQ in SAS for * * performing statistical inference with the odds ratio in a two-way * * frequency table. * ***********************************************************************; proc format; value groupfmt 0='placebo' 1='treatment'; value noyesfmt 0='no' 1='yes'; run; data adverse_reactions; input group advreact count; format group groupfmt. advreact noyesfmt.; cards; 0 0 40 0 1 4 1 0 32 1 1 12 ; run; proc freq data=adverse_reactions; tables group*advreact/chisq measures; exact chisq measures; weight count; title "Statistical Inference Using the Odds Ratio"; run;