An R Chart with Probability Limits

/****************************************************************/
/*          S A S   S A M P L E   L I B R A R Y                 */
/*                                                              */
/*    NAME: SHWREX1                                             */
/*   TITLE: An R Chart with Probability Limits                  */
/* PRODUCT: QC                                                  */
/*  SYSTEM: ALL                                                 */
/*    KEYS: Shewhart Charts, R Charts, Probability Limits,      */
/*   PROCS: SHEWHART                                            */
/*    DATA:                                                     */
/*                                                              */
/*     REF: SAS/QC Software:  Usage and Reference, Version 6,   */
/*          First Edition, Volume 1 and Volume 2                */
/*                                                              */
/****************************************************************/

data Disks;
   input Lot @;
   do i=1 to 6;
      input Time @;
      output;
   end;
   drop i;
   datalines;
  1 8.05 7.90 8.04 8.06 8.01 7.99
  2 8.03 8.06 8.02 8.02 7.97 8.03
  3 8.00 7.94 7.97 7.95 8.00 8.01
  4 8.00 8.06 8.06 7.99 7.97 7.96
  5 7.93 8.01 8.00 8.09 8.06 8.02
  6 7.98 7.99 8.01 8.09 8.00 7.97
  7 8.00 7.94 7.93 8.03 7.93 8.08
  8 8.01 7.98 7.98 8.07 8.05 8.09
  9 7.97 7.96 8.01 8.11 8.06 8.07
 10 7.93 8.03 8.03 8.00 7.93 8.03
 11 8.00 8.00 8.02 7.92 7.98 8.01
 12 7.98 7.93 8.01 7.97 8.02 8.00
 13 8.06 7.93 7.98 7.98 8.02 7.96
 14 8.05 7.98 8.05 7.99 7.95 7.99
 15 7.94 8.01 7.97 8.04 7.91 8.03
 16 8.03 8.03 8.02 8.06 8.00 7.97
 17 8.03 7.94 8.05 8.05 8.04 7.94
 18 7.99 7.99 7.86 7.99 8.06 8.03
 19 7.95 7.96 7.99 7.96 7.94 8.12
 20 8.03 8.07 7.98 7.97 8.00 8.04
 21 8.04 7.90 8.03 8.02 7.98 7.97
 22 7.95 8.05 7.98 8.01 7.97 8.15
 23 8.06 8.00 8.03 8.02 7.99 7.95
 24 7.97 8.02 8.00 7.96 7.96 8.00
 25 8.12 7.97 7.99 8.09 8.05 8.00
;


ods graphics on;
title 'Probability Limits for Disk Drive Test Times';
proc shewhart data=Disks;
   rchart Time*Lot / alpha     = .01
                     outlimits = Dlimits
                     odstitle  = title;
run;

title 'Probablity Limits for Disk Drive Test Times';
proc print data=Dlimits noobs;
run;

data Disks2;
   input Lot @;
   do i=1 to 6;
      input Time @;
      output;
   end;
   drop i;
   datalines;
26 7.93 7.97 7.89 7.81 7.88 7.92
27 7.86 7.91 7.87 7.89 7.83 7.87
28 7.93 7.95 7.90 7.89 7.88 7.90
29 7.97 8.00 7.86 7.89 7.84 7.78
30 7.91 7.93 7.98 7.93 7.83 7.88
31 7.85 7.94 7.88 7.98 7.96 7.84
32 7.86 8.01 7.88 7.95 7.90 7.89
33 7.87 7.93 7.96 7.89 7.81 8.00
34 7.87 7.97 7.95 7.89 7.92 7.84
35 7.92 7.97 7.90 7.88 7.89 7.86
36 7.96 7.90 7.90 7.84 7.90 8.00
37 7.92 7.90 7.98 7.92 7.94 7.94
38 7.88 7.99 8.02 7.98 7.88 7.92
39 7.89 7.91 7.92 7.90 7.94 7.94
40 7.84 7.88 7.91 7.98 7.87 7.93
41 7.91 7.87 7.96 7.91 7.89 7.92
42 7.96 7.93 7.86 7.93 7.86 7.94
43 7.84 7.82 7.87 7.91 7.91 8.01
44 7.93 7.91 7.92 7.88 7.91 7.86
45 7.95 7.92 7.93 7.90 7.86 8.00
;


title 'Probability Limits Applied to Second Set of Test Times';
proc shewhart data=Disks2 limits=Dlimits;
   rchart Time*Lot / readalpha
                     markers
                     odstitle = title;
run;