Prints CUSUM tables for controlling a process mean (A.F. Kane & R.W. Payne).
||Specifies the upper and then the lower reference values, or just one of these if they are both the same; default 0.5|
||Detection thresholds, upper and then the lower, or just one of these if they are both the same; default 5|
||Headstart values, upper and then the lower, or just one of these if they are both the same; default 0|
||Factor identifying samples or scalar indicating the size of each sample|
||Specifies the target value for the sample means|
||Specifies or saves the standard deviation of the observations|
SPCUSUM prints cumulative sum (or CUSUM) charts, as described for example by Ryan (1989). The data values consist of samples of measurements made on successive occasions, which are specified by the
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).
The chart displays columns containing:
1) the sample number;
2) the sample mean;
3) z, the devation of the mean from a target value, divided by its standard deviation;
4) SH, the upper CUSUM;
5) SL, the lower CUSUM.
An asterisk is printed alongside any values SH and SL that exceed a threshold value, indicating that the process is out of control.
The CUSUM values SHi and SLi for each sample i are calculated as
SHi = zi – ku + SHi-1
or = 0 if zi – ku + SHi-1 < 0
SLi = – zi – kl + SLi–1
or = 0 if – zi – kl + SLi-1 < 0
The target value is specified by the
MEANTARGET parameter. The
SIGMA parameter can be used to specify the standard deviation of the individual observations (which is required to calculate the standard deviation of the deviations of the sample means from the target value). It this is not set or if it is set to a missing value, the standard deviation is calculated using the within-sample replication, as the average of the standard deviations of the samples, divided by a bias correction constant c4:
c4 = √(2/n) ×
where n is the sample size. You can thus save the calculated standard deviation by setting
SIGMA to a scalar containing a missing value.
The reference values ku and kl are specified by the
REFERENCEVALUE option. If they are both the same, you need specify this only once. Their default is 0.5. Similarly the threshold value, or values, are specified by the
THRESHOLD option; by default these take the value 5. The CUSUMs usually start at 0, but you can specify another value or values using the
DATA variates nor the
SAMPLE factors may be restricted.
For further details of the method, and advice on the setting of thresholds, reference values and so on, see for example Ryan (1989) Section 5.3.
Ryan, T.P. (1989). Statistical Methods for Quality Improvement. Wiley, New York.
Commands for: Six sigma.
CAPTION 'SPCUSUM example',!t(\ 'Data from Ryan (1989, Statistical Methods for Quality Improvement,',\ 'page 107). Note: as the values are given to only 2 decimal places,',\ 'the sample means do not match those in the book. So, in the second',\ 'part of the example, the means are analysed rather than the individual',\ 'sample values.'); STYLE=meta,plain VARIATE x READ x 1.54 -0.09 1.75 -1.58 0.86 0.57 1.17 1.82 -0.89 0.21 -1.23 1.77 -1.88 -0.43 -0.42 -1.45 -1.85 2.03 -0.64 0.31 -2.53 -0.59 0.60 -0.22 -0.74 -1.25 -0.40 -1.01 2.10 1.48 0.86 -1.19 0.56 1.78 -0.81 0.97 -1.53 0.99 -2.38 1.41 0.53 -0.52 1.71 0.43 -0.81 0.67 0.42 0.46 0.84 -0.71 0.27 0.93 0.22 1.27 0.64 -0.83 2.30 -0.33 0.19 -0.38 2.14 0.51 -1.65 -0.14 1.03 0.30 0.55 1.65 -0.90 1.71 -1.08 0.93 1.56 -0.70 2.06 0.88 1.28 0.98 1.29 0.81 : SPCUSUM [THRESHOLD=4] x; SAMPLES=4; MEANTARGET=0; SIGMA=1 VARIATE [VALUES=0.41,1.11,-0.04,-1.04,-0.04,-0.68,-0.85,0.81,0.62,-0.38,\ 0.54,0.18,0.33,0.32,0.44,0.22,0.88,0.16,0.95,1.09] xbar SPCUSUM [THRESHOLD=4] xbar; SAMPLES=1; MEANTARGET=0; SIGMA=0.5