Applying Tests Based on Generalized Patterns

In addition to indices for standard tests, you can specify up to eight T-patterns or M-patterns with the TESTS= option:

  • Specifying a T-pattern requests a search for k out of m points in a row in the interval $(a,b)$. 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.

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:

Table 17.96: Options for T-Patterns

Option

Description

K=k

number of points $(k \leq m)$

M=m

number of consecutive points

LOWER=value

lower limit of interval $(a,b)$

UPPER=value

upper limit of interval $(a,b)$

SCHEME=ONESIDED

one-sided scheme using $(a,b)$

SCHEME=TWOSIDED

two-sided scheme using $(a,b)$ $\cup $ $(-b,-a)$

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:

  1. 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 $(a,b)$. Specifying SCHEME=TWOSIDED with positive values for a and b (where $a < b$) requests a two-sided test that searches for k out of m points in a row in the interval $(a,b)$ or k out of m points in a row in the interval $(-b,-a)$.

  2. 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 17.177.

  3. Specifying a missing value for the LOWER= option and a negative value for b requests a search in the interval $(-\infty ,b)$. Specifying a positive value for a and a missing value for the UPPER= option requests a search in the interval $(a,\infty )$.

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

  5. You can specify a label with the LABEL= option. The label must be enclosed in quotes 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.

  6. You must specify a legend with the LEGEND= option if you also specify the TABLELEGEND or TABLEALL option. The legend must be enclosed in quotes 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 17.187.

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 17.187: 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:

Table 17.97: Options for M-Patterns

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.

Caution: You should not substitute tests based on arbitrarily defined T-patterns and M-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 either a T-pattern or M-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.