Resources

Creating ANOM p Charts from Group Counts

/****************************************************************/
/*          S A S   S A M P L E   L I B R A R Y                 */
/*                                                              */
/*    NAME: ANMP1                                               */
/*   TITLE: Creating ANOM p Charts from Group Counts            */
/* PRODUCT: QC                                                  */
/*  SYSTEM: ALL                                                 */
/*    KEYS: ANOM Charts, Proportions Charts, Group Counts       */
/*   PROCS: ANOM                                                */
/*    DATA:                                                     */
/*                                                              */
/* SUPPORT: saswgr                                              */
/*     REF: PROC ANOM, PCHART Statement Getting Started 1       */
/*                                                              */
/****************************************************************/

data Csection;
   length ID $ 2;
   input ID Csections Total @@;
   label ID = 'Medical Group Identification Number';
   datalines;
1A  150  923 1K   45  298 1B   34  170 1D   18  132
3I   20  106 3M   12  105 1E   10   77 1N   19   74
1Q    7   69 3H   11   65 1R   11   49 1H    9   48
3J    7   20 1C    8   43 3B    6   43 1M    4   29
3C    5   28 1O    4   27 1J    6   22 1T    3   22
3E    4   18 1G    4   15 3D    4   13 3G    1   11
1L    2   10 1I    1    8 1P    0    3 1F    0    3
1S    1    3
;

title 'Cesarean Section Data';
proc print data=Csection (obs = 10) noobs;
run;

ods graphics off;
title 'Analysis of C-Sections';
proc anom data=Csection;
   pchart Csections*ID / groupn   = Total
                         hoffset  = 2
                         nolegend
                         turnhlabels;
   label Csections = 'Proportion of Cesarean Sections';
run;