Resources

Stratifying Data w/ Symbol Variable

 /****************************************************************/
 /*          S A S   S A M P L E   L I B R A R Y                 */
 /*                                                              */
 /*    NAME: SHWSYMB                                             */
 /*   TITLE: Stratifying Data w/ Symbol Variable                 */
 /* PRODUCT: QC                                                  */
 /*  SYSTEM: ALL                                                 */
 /*    KEYS: Shewhart Charts,                                    */
 /*   PROCS: SHEWHART                                            */
 /*    DATA:                                                     */
 /*                                                              */
 /*     REF: SAS/QC Software:  Examples                          */
 /*    MISC:                                                     */
 /*                                                              */
 /****************************************************************/

options ps=60 ls=80;

data savediam;
   input machine $ day diameterx diameters;
   informat day date7.;
   format day date7.;
   diametern=6;
   cards;
A386  01JUL86  4.32  0.39
A386  02JUL86  4.49  0.35
A386  03JUL86  4.44  0.44
A386  04JUL86  4.45  0.17
A386  05JUL86  4.21  0.53
A386  06JUL86  4.56  0.26
A386  07JUL86  4.63  0.39
A386  08JUL86  4.38  0.47
A455  09JUL86  4.42  0.37
A455  10JUL86  4.45  0.32
A455  11JUL86  4.62  0.36
A455  12JUL86  4.33  0.31
A455  13JUL86  4.29  0.33
A455  14JUL86  4.17  0.25
C334  15JUL86  4.15  0.28
C334  16JUL86  4.21  0.33
C334  17JUL86  4.16  0.19
C334  18JUL86  4.14  0.13
C334  19JUL86  4.11  0.19
C334  20JUL86  4.10  0.27
C334  21JUL86  3.99  0.14
C334  22JUL86  4.24  0.16
C334  23JUL86  4.23  0.14
A386  24JUL86  4.27  0.28
A386  25JUL86  4.70  0.45
A386  26JUL86  4.51  0.45
A386  27JUL86  4.34  0.16
A386  28JUL86  4.38  0.29
A386  29JUL86  4.28  0.24
A386  30JUL86  4.47  0.26
A386  31JUL86  4.31  0.46
;

symbol1 v=star     c=red    h=1.5;
symbol2 v=circle   c=green  h=1.5;
symbol3 v=triangle c=blue   h=1.5;

title 'Shewhart Chart for Diameter '
      'Stratified By Machine';

proc shewhart history=savediam;
   xschart diameter*day=machine /
      split    = '/'
      hoffset  = 2
      cframe   = gray
      cconnect = black
      nohlabel
      novangle
      nolegend;
label diameterx='Avg Diameter/Std Dev';
run;

goptions reset=all;