Resources

X-bar and R CHARTS-Specifying Standard Values

/****************************************************************/
/*          S A S   S A M P L E   L I B R A R Y                 */
/*                                                              */
/*    NAME: SHWXR3                                              */
/*   TITLE: X-bar and R CHARTS-Specifying Standard Values       */
/* PRODUCT: QC                                                  */
/*  SYSTEM: ALL                                                 */
/*    KEYS: Shewhart Charts, Mean and Range Charts,             */
/*   PROCS: SHEWHART                                            */
/*    DATA:                                                     */
/*                                                              */
/*     REF: SAS/QC Software:  Usage and Reference, Version 6,   */
/*          First Edition, Volume 1 and Volume 2                */
/*                                                              */
/****************************************************************/

data Tape;
   input Sample $ WeightX WeightR;
   WeightN=5;
   label WeightX = 'Average Adhesive Amount'
         Sample  = 'Sample Code';
   datalines;
C9  1270  35
C4  1258  25
A7  1248  24
A1  1260  39
A5  1273  29
D3  1260  21
D6  1259  37
D1  1240  37
R4  1260  28
H7  1255  19
H2  1268  36
H6  1253  36
P4  1273  29
P9  1275  22
J7  1257  24
J2  1269  41
J3  1249  36
B2  1264  31
G4  1258  25
G6  1248  36
G3  1248  30
;


ods graphics on;
title 'Specifying Standard Process Mean and Standard Deviation';
proc shewhart history=Tape;
   xrchart Weight*Sample / mu0      = 1260
                           sigma0   = 15
                           xsymbol  = mu0
                           odstitle = title;
run;

data Tapelim;
   length _var_ _subgrp_ _type_ $8;
   _var_    = 'Weight';
   _subgrp_ = 'Sample';
   _type_   = 'STANDARD';
   _limitn_ = 5;
   _mean_   = 1260;
   _stddev_ = 15;

proc shewhart history=Tape limits=Tapelim;
   xrchart Weight*Sample / xsymbol=mu0;
run;