Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
The SHEWHART Procedure

Example 3.2: Using Overlays

This example uses the SHEWHART procedure to do analysis of means (ANOM) for rate data. It is based on an example from Rodriguez (1996). That example is in ANOMP in the SAS/QC sample library.

A health care system uses ANOM to compare cesarean section rates for a set of medical groups. The following statements create a SAS data set named csection:

   data csection;
      length id $ 2;
      input id csect94 vag94 csect95 vag95;
      total94  = csect94 + vag94;
      total95  = csect95 + vag95;
      label id = 'Medical Group Identification Number';
   datalines;
   1A      163     907     150     773
   1K       55     314      45     253
   1B       52     179      34     136
   1D       19     128      18     114
   3I       21      98      20      86
   3M       15      81      12      93
   1E       15      52      10      67
   1N        6      43      19      55
   1Q       12      67       7      62
   3H        7      65      11      54
   1R        4      43      11      38
   1H        5      32       9      39
   3J        7      12       7      13
   1C       13      42       8      35
   3B        3      33       6      37
   1M        6       8       4      25
   3C        6      27       5      23
   1O        8      26       4      23
   1J        6      18       6      16
   1T        1       3       3      19
   3E        2      12       4      14
   1G        1       7       4      11
   3D        7      22       4       9
   3G        2       5       1      10
   1L        2       4       2       8
   1I        1       3       1       7
   1P       16      65       0       3
   1F        0       1       0       3
   1S        1       2       1       2
   ;

   data csection;
      set csection end=eof;
      if eof then call symput('ngroups', left( put( _n_, 4. )));
      rate94 = csect94 / total94;
   run;

The variable id identifies the medical groups. The variable csect95 provides the number of c-sections for each group during 1995, and the variable total95 provides the total number of deliveries for each group. The variables csect94 and total94 provide similar counts for 1994.

The original example used an annotate data set to overlay rates from 1994 on the ANOM chart of 1995 rates. Now you can use OVERLAY= and related options to produce overlaid plots. The following statements create the ANOM chart shown in Output 3.2.1:

   %anomsig( 0.01, &ngroups );
   title 'Proportion of C-Sections:'
         ' 1994 and 1995';
   symbol v=dot c=black h=2.4pct;
   proc shewhart data=csection;
      pchart csect95*id / subgroupn=total95
                          noconnect
                          turnhlabels
                          nolegend
                          lcllabel = 'LDL'
                          ucllabel = 'UDL'
                          overlay = (rate94)
                          coverlay = (red)
                          ccoverlay = (none)
                          overlaysym = (circle)
                          overlaysymht = (2.4)
                          haxis = axis1
                          sigmas=&sigmult;
   axis1 value = ( h=2.2 pct ) ;
   label csect95 = 'Proportion of Cesarean Sections';
   label rate94 = '1994 Rates';
   run;
The anomsig macro computes the appropriate multiple of \sigmafor the SIGMAS= option. It is defined in ANOMSIG in the SAS/QC sample library.

Output 3.2.1: ANOM Chart with Overlay
overlay.gif (4784 bytes)

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.