The SHEWHART Procedure |
[See SHWTSC1 in the SAS/QC Sample Library]The following example illustrates how to request the standard tests for special causes. The tests are applied to an chart for assembly offset measurements whose subgroup means, ranges, and sample sizes are provided by the variables OffsetX, OffsetR, and OffsetN, respectively, in a data set named Assembly. 1
data Assembly; length System $ 1 comment $ 16; label Sample = 'Sample Number'; input System Sample OffsetX OffsetR OffsetN comment $16. ; datalines; T 1 19.80 3.8 5 T 2 17.16 8.3 5 T 3 20.11 6.7 5 T 4 20.89 5.5 5 T 5 20.83 2.3 5 T 6 18.87 2.6 5 T 7 20.84 2.3 5 T 8 23.33 5.7 5 New Tool T 9 19.21 3.5 5 T 10 20.48 3.2 5 T 11 22.05 4.7 5 T 12 20.02 6.7 5 T 13 17.58 2.0 5 T 14 19.11 5.7 5 T 15 20.03 4.1 5 R 16 20.56 3.7 5 Changed System R 17 20.86 3.3 5 R 18 21.10 5.6 5 Reset Tool R 19 19.05 2.7 5 R 20 21.76 2.8 5 R 21 21.76 6.4 5 R 22 20.54 4.8 5 R 23 20.04 8.2 5 R 24 19.94 8.8 5 R 25 20.70 5.1 5 Q 26 21.40 12.1 7 Bad Reading Q 27 21.32 3.2 7 Q 28 20.03 5.2 7 New Gauge Q 29 22.02 5.9 7 Q 30 21.32 4.3 7 ; run;
The following statements use the TESTS= option to request Tests 1 to 4. Note that the process Offset is specified in the XRCHART statement to indicate that the three summary variables OffsetX, OffsetR, and OffsetN are to be read from the HISTORY= data set Assembly.
title 'Analysis of Assembly Data'; proc shewhart history=Assembly; xrchart Offset * Sample / mu0 = 20 sigma0 = 2.24 limitn = 5 alln tests = 1 to 4 vaxis = 16 to 26 by 2 split = '/'; label OffsetX = 'Avg Offset in cm/Range'; run;
The chart is displayed in Figure 13.43.63. Test 1 is positive at the th subgroup, and Test 3 is positive at the th subgroup.
The control limits in Figure 13.43.63 are based on standard values for the process mean and standard deviation specified with the MU0= and SIGMA0= options, respectively. Although the subgroup sizes vary, fixed control limits are displayed corresponding to a nominal sample size of five, which is specified with the LIMITN= option. Since ALLN is specified, points are displayed for all subgroups, regardless of sample size.
Note:If the LIMITN= option were not specified, the control limits would vary with subgroup sample size, and by default the tests would not be applied. An alternative method for applying the tests with varying subgroup sample sizes is discussed in Applying Tests with Varying Subgroup Sample Sizes.
Copyright © SAS Institute, Inc. All Rights Reserved.