In addition to indices for standard tests, you can specify up to eight T-patterns, M-patterns, or S-patterns with the TESTS= option:
Specifying a T-pattern requests a search for k out of m points in a row in the interval . Tests based on T-patterns are generalizations of Tests 1, 2, 5, and 6. The average run length properties of tests based on T-patterns have been analyzed by Champ and Woodall (1987). Also refer to Chapter 8 of Wetherill and Brown (1991).
Specifying an M-pattern requests a search for k points in a row increasing or decreasing. Tests based on M-patterns are generalizations of Test 3.
Specifying an S-pattern requests a search for a statistically significant linear trend. Tests based on S-patterns are not generalizations of any standard test for special causes. Instead, a parametric or nonparametric test for a linear trend is applied over a window of k data points.
The general syntax for a T-pattern is of the form
T(K=k M=m LOWER=a UPPER=b SCHEME=scheme CODE=character LABEL=’label’ LEGEND=legend )
The options for a T-pattern are summarized in the following table:
Option |
Description |
---|---|
K=k |
Number of points |
M=m |
Number of consecutive points |
LOWER=value |
Lower limit of interval |
UPPER=value |
Upper limit of interval |
SCHEME=ONESIDED |
One-sided scheme using |
SCHEME=TWOSIDED |
Two-sided scheme using |
CODE=character |
Identifier for test (A–H) |
LABEL=’label’ |
Label for points that are signaled |
LEGEND=’legend’ |
Legend used with the TABLELEGEND option |
The following rules apply to the T-pattern options:
You must specify SCHEME=scheme. Specifying SCHEME=ONESIDED requests a one-sided test that searches for k out of m points in a row in the interval . Specifying SCHEME=TWOSIDED with positive values for a and b (where ) requests a two-sided test that searches for k out of m points in a row in the interval or k out of m points in a row in the interval .
The values a and b must be specified in standardized units, and they must both have the same sign. For instance, specifying LOWER=2 and UPPER=3 with SCHEME=TWOSIDED corresponds to Zone A in Figure 18.178.
Specifying a missing value for the LOWER= option and a negative value for b requests a search in the interval . Specifying a positive value for a and a missing value for the UPPER= option requests a search in the interval .
You must specify a CODE=character, which can be any of the letters A through H. The character identifies the pattern in tables requested with the TABLETESTS
and TABLEALL options and in the value of the variable _TESTS_
in the OUTTABLE=
data set. The character is analogous to the indices 1 through 8 that are used to identify the standard tests. If you request
multiple T-patterns, you must specify a unique character for each pattern.
You can specify a label with the LABEL= option. The label must be enclosed in quotation marks and can be up to 16 characters long. The label is used to label points on the chart at which the test defined by the T-pattern is signaled. The LABEL= option is similar to the TESTLABELn= options used with the standard tests.
You must specify a legend with the LEGEND= option if you also specify the TABLELEGEND or TABLEALL option. The legend must be enclosed in quotation marks and can be up to 40 characters long. The legend is used to describe the test defined by the T-pattern in the table legend requested with the TABLELEGEND and TABLEALL options.
Note: See Applying Tests Based on General Patterns in the SAS/QC Sample Library.
An example of a nonstandard test using a T-pattern is the run test based on 14 out of 17 points in a row on the same side of the central line that is suggested by Wheeler and Chambers (1986). The following statements apply this test with Tests 1, 3, and 4. The resulting chart is shown in Figure 18.188.
ods graphics off; title 'Analysis of Assembly Data'; proc shewhart history=Assembly; xrchart Offset * Sample / mu0 = 20 sigma0 = 2.24 limitn = 5 alln tests = 1 t( k=14 m=17 lower=0 upper=. scheme=twosided code=A label='Test A' ) 3 4 vaxis = 16 to 26 by 2 split = '/' ; label OffsetX = 'Avg Offset in cm/Range'; run;
Figure 18.188: Generalized T-Pattern Applied to Assembly Data
The specified T-pattern is signaled at 30th subgroup. Consequently, this point is labeled Test A.
The general syntax for an M-pattern is of the form
M(K=k DIR=direction CODE=character LABEL=’label’ LEGEND=’legend’ )
The options for an M-pattern are summarized in the following table:
Option |
Description |
---|---|
K=k |
Number of points |
DIR=INC |
Increasing pattern |
DIR=DEC |
Decreasing pattern |
CODE=character |
Identifier for test (A–H) |
LABEL=’label’ |
Label for points that are signaled |
LEGEND=’legend’ |
Legend used with the TABLELEGEND option |
You must specify the direction of the pattern with the DIR= option.
The general syntax for an S-pattern is of the form
S(K=k CLEV= FORM=character CODE=character LABEL=’label’ LEGEND=’legend’ )
The options for an S-pattern are summarized in the following table:
Option |
Description |
---|---|
K=k |
Number of points in sliding window () |
CLEV= |
Type I (false positive) error rate () |
FORM=character |
Type of trend test (P=parametric, N=nonparametric) |
CODE=character |
Identifier for test (A–H) |
LABEL=’label’ |
Label for points that are signaled |
LEGEND=’legend’ |
Legend used with the TABLELEGEND option |
The S-pattern provides the flexibility to employ either a parametric or nonparametric linear trend test that uses a sliding window of length k. The parametric trend test is based on simple linear regression, with a t test to determine whether the computed slope is statistically significant (Draper and Smith 1981). Similarly, the nonparametric trend test uses a standardized Kendall rank correlation coefficient to identify a statistically significant trend (Kendall 1955). You can vary the power of either test type through judicious choices of the type I error rate and the sliding window length k.
An example of a nonstandard test that uses an S-pattern follows. Here, a simulated process is in statistical control for the first 100 samples, but then the process starts to drift in a linear fashion. The following statements apply the S-pattern test to the simulated data. The resulting chart is shown in Figure 18.189.
ods graphics off; title 'Shewhart chart for drifting process'; proc shewhart data=work.temp; irchart Simulated_Drifting_Process*Sample / tests=s(k=25 clev=0.02 form=N code=C legend='Nonparametric Slope Test Signaled') odstitle=title nochart2 totpanels=1 outtable=work.temp_out; run;
Figure 18.189: S-Pattern Applied to Simulated Data
The specified S-pattern is signaled at the 134th and 159th samples. Consequently, these points are labeled Test C, and the preceding k points are highlighted to indicate the data that exhibit a linear trend.
Caution: You should not substitute tests based on arbitrarily defined T-patterns, M-patterns, or S-patterns for standard tests in general process control applications. The pattern options are intended primarily as a research tool.
Note: See ARL With Supplementary Run Rules in the SAS/QC Sample Library.
Champ and Woodall (1990) provide a FORTRAN program for assessing the run length distribution of tests based on T-patterns. A version of their algorithm is implemented by a SAS/IML program in the SAS/QC Sample Library.
If you specify a T-pattern, M-pattern, or S-pattern with the TESTS= option and save the results in an OUTTABLE= data set,
the length of the variable _TESTS_
is 16 rather than 8 (the default). The ninth character of _TESTS_
is assigned the value 'A' if the test with CODE=A is signaled, the tenth character of _TESTS_
is assigned the value 'B' if the test with CODE=B is signaled, and so on. If you also specify one or more standard tests,
the ith character of _TESTS_
is assigned the value i if Test i is signaled.