Resources

Individual Measurement and Moving Range Charts

/****************************************************************/
/*          S A S   S A M P L E   L I B R A R Y                 */
/*                                                              */
/*    NAME: SHWIR1                                              */
/*   TITLE: Individual Measurement and Moving Range Charts      */
/* PRODUCT: QC                                                  */
/*  SYSTEM: ALL                                                 */
/*    KEYS: Shewhart Charts, Individual Measurements and Moving */
/*          Range Charts,                                       */
/*   PROCS: SHEWHART                                            */
/*    DATA:                                                     */
/*                                                              */
/*     REF: SAS/QC Software:  Usage and Reference, Version 6,   */
/*          First Edition, Volume 1 and Volume 2                */
/*                                                              */
/****************************************************************/

data Jets;
   input Engine Diam @@;
   label Engine = "Engine Number";
   datalines;
 1 78.4   2 80.1   3 84.4   4 79.1   5 80.4
 6 83.5   7 73.8   8 83.5   9 75.0  10 76.8
11 70.5  12 80.3  13 82.4  14 79.4  15 86.4
16 90.5  17 77.7  18 82.5  19 79.9  20 83.2
;

title 'The Data Set JETS';
proc print data=Jets(obs=5) noobs;
run;

ods graphics off;
title 'Individual Measurements and Moving Range Charts';
title2 'Jet Engine Diameters (cm)';
proc shewhart data=Jets;
   irchart Diam*Engine;
run;

proc shewhart data=Jets;
   irchart Diam*Engine / outhistory = Jetinfo
                         nochart;
run;

title 'Individual Measurements and Moving Ranges for Diameters';
proc print data=Jetinfo(obs=5) noobs;
run;

symbol h = .8;
title 'Individual Measurements and Moving Range Charts';
proc shewhart history=Jetinfo;
   irchart Diam*Engine;
run;

proc shewhart data=Jets;
   irchart Diam*Engine / outlimits = Jetlim
                         nochart;
run;

title 'Control Limits for Diameters';
proc print data=Jetlim noobs;
run;

proc shewhart data=Jets;
   irchart Diam*Engine / outtable=Jtable
                         nochart;
run;

title 'Summary Statistics and Control Limit Information';
proc print data=Jtable noobs;
run;

title 'Individual Measurements and Moving Range Control Charts';
title2 'Jet Engine Diameters (cm)';
proc shewhart table=Jtable;
   irchart Diam*Engine;
run;

data Jets2;
   input Engine Diam @@;
   label Diam   = "Inner Diameter (cm)"
         Engine = "Engine Number";
   datalines;
21 81.8  22 87.5  23 80.0  24 89.3  25 83.9
26 76.3  27 75.8  28 82.4  29 82.6  30 77.7
31 79.3  32 81.4  33 76.8  34 75.9  35 86.3
36 77.4  37 80.9  38 87.1  39 85.7  40 73.3
;

options nogstyle;
goptions ftext=swiss;
title 'Individual Measurements and Moving Range Control Charts';
proc shewhart data=Jets2 limits=Jetlim;
   irchart Diam*Engine / cframe = vigb
                         cconnect = yellow
                         coutfill = red
                         cinfill = vlib;
run;
options gstyle;

ods graphics on;
title 'Specifying the Computation of the Moving Range';
proc shewhart data=Jets;
   irchart Diam*Engine / limitn=3 odstitle=title;
run;