SPSHEWHART procedure
Plots control charts for mean and standard deviation or range (A.F. Kane & R.W. Payne).
Options
Parameters
Description
SPSHEWHART plots the standard charts devised by Shewhart (1931) for the control of manufacturing processes. The data values consist of samples of measurements made on successive occasions, which are specified by the DATA and SAMPLES parameters. DATA can be set to a variate containing the measurement and SAMPLES to a factor identifying the samples. Alternatively, if the samples are all of the same size and occur in the DATA variate one sample at a time, you can set SAMPLES to a scalar indicating the size of each sample. Finally, if the samples are in separate variates, you can set DATA to a pointer containing the variates (SAMPLES is then unset).
Two charts are produced. The first chart plots the mean of each sample. It also contains a centre line (indicating a target value) and lines representing upper and lower control limits (bounding the zone outside which the process is said to be out of control). The MEAN and SIGMA parameters allow you to supply values for the process mean and standard deviation if these are available either as targets or from previous observations. If they are unset, or if they are set to scalars containing missing values, the values are calculated from the data values (see the Methods Section). The traditional chart (and the one that is most popular in the USA) sets the centre line at the mean, and the control limits at 3 × SIGMA and -3 × SIGMA from the mean. The alternative (often used in the UK and requested by setting option METHOD to probability) sets control limits according to probability values. Usually the lower control limit is at the equivalent deviate value for a probability of 0.01, and the upper limit is at the value for 0.99 (see the Methods Section). There may also be intermediate warning limits, usually at 0.025 and 0.975. These are the default probabilities used by SPSHEWHART, but you can set the PROBABILITY option to a variate containing one or two values to define other limits. (If the values are p1 and p2, the limits are then for probabilities p1, p2, 100-p2, 100-p1.)
The control limits relevant to each batch will depend on the sample sizes. The TOLERANCE option determines whether an average sample size is used if the individual sizes are not exactly equal: this will happen unless either
MIN(sample_size) * TOLERANCE < MEAN(sample_size)
or
MEAN(sample_size) * TOLERANCE < MAX(sample_size)
The second chart is either for the standard deviation of values in each sample or for their range, according to the setting of the PLOT option (by default PLOT=standarddeviatiion). Traditionally, before computers were available, the range chart was more popular. However, it is less sensitive than the standard deviation, particularly for larger samples, and SPSHEWHART does not permit range charts if any sample size is greater than 25.
If the number in each sample is one, the chart of the means is known as an individuals chart. There is now no within-sample replication, so the range chart instead presents a moving range displaying the range between each sample and the previous sample. Similarly, the standard deviations are calculated between each sample and its previous sample.
You can set PRINT=warnings to list any batches that are outside the control limits; by default these are suppressed. As usual, the WINDOWS option specifies which high-resolution graphics windows to use for the plots. If this is unset, SPSHEWHART automatically sets up and uses two windows containing the upper and lower halves of the screen. The SCREEN option controls whether or not to clear the graphics screen before plotting the charts.
Options: PRINT, PLOT, METHOD, TOLERANCEMULTIPLIER, PROBABILITY, WINDOWS, SCREEN.
Parameters: DATA, SAMPLES, MEAN, SIGMA.
Method
SPSHEWHART follows the standard methods as described for example by Nelson (1982), Montgomery (1985) or Ryan (1989). If required, the mean is estimated in the usual way by the average of the sample values. Likewise, the standard deviation is estimated by the average of the standard deviations of the samples, divided by a bias correction constant c4:
c4 = √(2/n) × GAMMA(n/2) / GAMMA((n-1)/2)
where n is the sample size.
First of all we describe the calculations with METHOD=sigma. In the mean chart, the centre line is at the mean (i.e. MEAN), and the control limits at MEAN + 3 × SIGMA and MEAN - 3 × SIGMA. In the range chart, if the standard deviation has been supplied, the centre line is at d2 × SIGMA and the control limits at D1 × SIGMA and D2 × SIGMA; if the standard deviation has not been supplied, the centre line is at the mean of the ranges observed in the samples, and the control limits are at D3 × SIGMA and D4 × SIGMA. (See Appendix VI of Montgomery, or Nelson 1982 Table 1 for values of the constants d2, and D1-D4.) In the standard-deviation chart, the centre line is at SIGMA × c4 (so that it exhibits the same bias as the sample standard deviations) and the control limits are at 3 × SIGMA × √(1 - c4 2) above and below the centre line.
For METHOD=probability, the centre lines are unaffected. However, the control limits for the means chart are now at
EDNORMAL(PROBABILITY) * SIGMA / SQRT(N)
above and below the centre line. For the range chart, the control limits are at
SIGMA * EDSRANGE(PROBABILITY; 1000; N)
and
SIGMA * EDSRANGE(1-PROBABILITY; 1000; N)
(where the high value 1000 used for the degrees of freedom of the Studentized range is to obtain the value for the Normal range). For the standard-deviation chart, the control limits are at
SQRT(EDCHI(PROBABILITY; N-1) / (N-1))
and
SQRT(EDCHI(1-PROBABILITY; N-1) / (N-1))
Action with
RESTRICT
Neither the DATA variates nor the SAMPLE factors may be restricted.
References
Montgomery, D.C. (1985). Introduction to Statistical Process Control. Wiley, New York.
Nelson, L.S. (1982). Control charts. In: Encyclopedia of Statistical Sciences (ed. S. Kotz, N.L. Johnson & C.B. Read), Volume 2, 176-183. Wiley, New York.
Ryan, T.P. (1989). Statistical Methods for Quality Improvement. Wiley, New York.
Shewhart, W.A. (1931). Economic Control of Quality of Manufactured Product. Van Nostrand, New York.