Tests for Special Causes Applied to c Chart

/****************************************************************/
/*          S A S   S A M P L E   L I B R A R Y                 */
/*                                                              */
/*    NAME: SHWCEX1                                             */
/*   TITLE: Tests for Special Causes Applied to c Chart         */
/* PRODUCT: QC                                                  */
/*  SYSTEM: ALL                                                 */
/*    KEYS: Shewhart Charts, c Charts, Tests for Special Causes,*/
/*   PROCS: SHEWHART                                            */
/*    DATA:                                                     */
/*                                                              */
/*     REF: SAS/QC Software:  Usage and Reference, Version 6,   */
/*          First Edition, Volume 1 and Volume 2                */
/*                                                              */
/****************************************************************/

data Trucks3;
   input TruckID $ Defects @@;
   label TruckID='Truck Identification Number'
         Defects='Number of Paint Defects';
   datalines;
B1  12    B2  4    B3  4    B4   3
B5   4    D1  2    D2  3    D3   3
D4   2    D9  4    M2  9    M6  13
L3   5    L4  4    L7  6    Z1  15
Z2   8    Z3  9    Z7  6    Z9   8
;

ods graphics on;
title1 'c Chart for Paint Defects in New Trucks';
title2 'Tests=1 to 4';
proc shewhart data=Trucks3;
   cchart Defects*TruckID / tests      = 1 to 4
                            testlabel1 = 'Test=1 Signaled'
                            testlabel2 = 'Test=2 signaled'
                            odstitle   = title
                            odstitle2  = title2
                            zonelabels
                            tabletests
                            tablelegend;
run;