Documentation Example 8 for PROC FREQ

/****************************************************************/
/*          S A S   S A M P L E   L I B R A R Y                 */
/*                                                              */
/*    NAME: FREQEX8                                             */
/*   TITLE: Documentation Example 8 for PROC FREQ               */
/* PRODUCT: STAT                                                */
/*  SYSTEM: ALL                                                 */
/*    KEYS: categorical data analysis,                          */
/*    KEYS: measures of association, confidence limits,         */
/*    KEYS: Cochran-Armitage trend test, exact test,            */
/*    KEYS: ODS Graphics, stacked bar chart                     */
/*   PROCS: FREQ                                                */
/*    DATA:                                                     */
/*                                                              */
/* SUPPORT: sasdlw                UPDATE: January 28, 2011      */
/*     REF: PROC FREQ, Example 8                                */
/*    MISC:                                                     */
/****************************************************************/
/* Cochran-Armitage Trend Test ---------------------------------*/
data pain;
   input Dose Adverse $ Count @@;
   datalines;
0 No 26   0 Yes  6
1 No 26   1 Yes  7
2 No 23   2 Yes  9
3 No 18   3 Yes 14
4 No  9   4 Yes 23
;
ods graphics on;
proc freq data=Pain;
   tables Adverse*Dose / trend measures cl
          plots=mosaicplot;
   test smdrc;
   exact trend / maxtime=60;
   weight Count;
   title 'Clinical Trial for Treatment of Pain';
run;
ods graphics off;