SPCUSUM procedure

Prints CUSUM tables for controlling a process mean (A.F. Kane & R.W. Payne).


Options

REFERENCEVALUE = scalars
Specifies the upper and then the lower reference values, or just one of these if they are both the same; default 0.5

THRESHOLD = scalars
Detection thresholds, upper and then the lower, or just one of these if they are both the same; default 5

HEADSTART = scalars
Headstart values, upper and then the lower, or just one of these if they are both the same; default 0


Parameters

DATA = variates or pointers
Data measurements

SAMPLES = factors or scalars
Factor identifying samples or scalar indicating the size of each sample

MEANTARGET = scalars
Specifies the target value for the sample means

SIGMA = scalars
Specifies or saves the standard deviation of the observations


Description

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 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).

   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) × GAMMA(n/2) / GAMMA((n-1)/2)

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 HEADSTART option.

 

Options: REFERENCEVALUE, THRESHOLD, HEADSTART.

Parameters: DATA, SAMPLES, MEANTARGET, SIGMA.


Reference

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.


Action with RESTRICT

Neither the DATA variates nor the SAMPLE factors may be restricted.


Reference

Ryan, T.P. (1989). Statistical Methods for Quality Improvement. Wiley, New York.