The SPC Procedure

Dictionary of Options

The following entries provide detailed descriptions of options that are available in the chart statements: BOXCHART, CCHART, IRCHART, MCHART, MRCHART, NPCHART, PCHART, RCHART, SCHART, UCHART, XCHART, XRCHART, and XSCHART.

ALLN

includes all subgroups in the analysis, regardless of whether the subgroup sample size equals the nominal control limit sample size n that you specify in the LIMITN= option or the variable _LIMITN_ in the LIMITS= data table. Use the ALLN option in conjunction with the LIMITN= option or the variable _LIMITN_.

CIINDICES <(<TYPE=LOWER | UPPER | TWOSIDED> <ALPHA=value>)>

requests capability index confidence limits that are based on subgroup summary data and are calculated using "effective degrees of freedom," as described by Bissell (1990). These confidence limits are approximate. When you specify the CIINDICES option, the calculated confidence limits are displayed in the "CapabilityIndices" table and are included in the OUTLIMITS= data table, if one is produced.

TYPE=keyword

specifies the type of confidence limit. Valid keywords are LOWER, UPPER, and TWOSIDED. By default, TYPE=TWOSIDED.

ALPHA=value

specifies the default confidence level to compute confidence limits. The percentage for the confidence limits is . For example, ALPHA=.05 results in a 95% confidence limit. The default value is .05, and the possible range of values is from 0 to 1.

The CIINDICES option is ignored unless you also specify the SPECS= option. These options are available only in the chart statements that produce charts for variables: BOXCHART, IRCHART, MCHART, MRCHART, RCHART, SCHART, XCHART, XRCHART, and XSCHART. For more information about capability indices, see the section Capability Indices.

CONTROLSTAT=MEAN | MEDIAN

specifies whether the control limits that are displayed in a box chart are computed for subgroup means or for subgroup medians. By default, CONTROLSTAT=MEAN. This option is available only in the BOXCHART statement.

EXCHART

includes a control chart in the results only when exceptions occur—specifically, when the control limits are exceeded or when any tests that you request by using the TESTS= or TESTS2= option are positive.

LIMITN=n

specifies a nominal sample size for the control limits.

If you specify LIMITN=n, the control limits are computed for the fixed value n, and they do not vary with the subgroup sample sizes. Moreover, only those subgroups whose sample size is equal to n are included in the analysis. You can specify ALLN in conjunction with LIMITN=n to force all subgroups to be included, regardless of subgroup sample size.

If you do not specify LIMITN=n and the subgroup sample sizes are constant, the default value of n is the constant subgroup sample size.

Depending on which chart statement you use, there are restrictions on the value of n that you can specify in the LIMITN= option. For the MRCHART, RCHART, and XRCHART statements, . For the SCHART and XSCHART statements, . For the BOXCHART, MCHART, and XCHART statements, . If the estimate of the process standard deviation is based on subgroup ranges (see the SMETHOD= option and the section Methods of Estimating the Standard Deviation), n < 26. For the CCHART and UCHART statements, n > 0, and n can assume fractional values (for all other chart statements, n must be a whole number). For the PCHART and NPCHART statements, .

Note the difference between the LIMITN= option and the SUBGROUPN= option that is available in the CCHART, NPCHART, PCHART, and UCHART statements. The LIMITN= option specifies a nominal sample size for the control limits, whereas the SUBGROUPN= option provides the sample sizes for the data.

Note: As an alternative to specifying the LIMITN= option, you can read the nominal control limit sample size from the variable _LIMITN_ in a LIMITS= data table.

MEDCENTRAL=AVGMEAN | AVGMED | MEDMED

identifies a method of estimating the process mean , which is represented by the central line on a median chart. The method that corresponds to each keyword is shown in Table 20.14.

Table 20.14: Methods of Estimating the Process Mean

Keyword

Method

AVGMEAN

Average of subgroup means

AVGMED

Average of subgroup medians

MEDMED

Median of subgroup medians


By default, MEDCENTRAL=AVGMED. This option is available only in the MCHART and MRCHART statements, and in the BOXCHART statement when you specify the CONTROLSTAT=MEDIAN option.

NO3SIGMACHECK

suppresses the check for limits when you request tests for special causes. This enables tests for special causes to be applied when you use SIGMAS= option to specify control limits other than the default limits. You should not use the NO3SIGMACHECK option for standard control chart applications, because the standard tests for special causes assume limits.

NOPRINT

suppresses the display of ODS output.

OUTLIMITS=CAS-libref.data-table

creates an output data table that saves the control limits. You can use an OUTLIMITS= data table as an input LIMITS= data table in a subsequent run of the procedure. CAS-libref.data-table is a two-level name, where CAS-libref refers to the caslib and session identifier, and data-table specifies the name of the output data table. For more information about this two-level name, see the DATA= option and the section Using CAS Sessions and CAS Engine Librefs.

For more information about OUTLIMITS= data tables, see the section OUTLIMITS= Data Table.

OUTTABLE=CAS-libref.data-table

creates an output SAS data table that saves the information plotted on the chart, including the subgroup variable values and their corresponding summary statistics and control limits. CAS-libref.data-table is a two-level name, where CAS-libref refers to the caslib and session identifier, and data-table specifies the name of the output data table. For more information about this two-level name, see the DATA= option and the section Using CAS Sessions and CAS Engine Librefs.

For more information about OUTTABLE= data tables, see the section OUTTABLE= Data Table.

PCTLDEF=index

specifies one of five definitions that are used to calculate percentiles in the construction of box-and-whisker plots that you request in the BOXCHART statement. The index can be 1, 2, 3, 4, or 5. The five corresponding percentile definitions are discussed in the section Percentile Definitions. By default, PCTLDEF=5. This option is available only in the BOXCHART statement.

SIGMAS=k

specifies the width of the control limits in terms of the multiple k of the standard error of the subgroup summary statistic. The value of k must be positive. By default, k = 3, and the control limits are limits.

SMETHOD=MAD | MMR<(n)> | MVGRANGE<(n)> | RMSDF | RMVLUE | RNOWEIGHT | SMVLUE | SNOWEIGHT

specifies the method of estimating the process standard deviation, , as summarized in Table 20.15.

Table 20.15: Methods of Estimating the Process Standard Deviation

Keyword

Method

MAD

Calculates a median absolute deviation estimate of

MMR

Calculates a median moving range estimate of

MVGRANGE

Estimates based on a moving range of n subgroup means

RMSDF

Calculates a root mean square estimate of

RMVLUE

Calculates a minimum variance linear unbiased estimate of based on subgroup ranges

RNOWEIGHT

Estimates as an unweighted average of unbiased subgroup estimates of based on subgroup ranges

SMVLUE

Calculates a minimum variance linear unbiased estimate of based on subgroup standard deviations

SNOWEIGHT

Estimates as an unweighted average of unbiased subgroup estimates of based on subgroup standard deviations


Table 20.16 lists the SMETHOD= option values that are valid for each chart statement. The default value for each statement is shown in bold.

Table 20.16: Valid SMETHOD= Values by Chart Statement

Chart Statement

Methods

BOXCHART

RMSDF, RMVLUE, RNOWEIGHT, SMVLUE, SNOWEIGHT

IRCHART

MAD, MMR, MVGRANGE

MCHART

RMSDF, RMVLUE, RNOWEIGHT, SMVLUE, SNOWEIGHT

MRCHART

RMVLUE, RNOWEIGHT

RCHART

RMVLUE, RNOWEIGHT

SCHART

RMSDF, SMVLUE, SNOWEIGHT

XCHART

RMSDF, RMVLUE, RNOWEIGHT, SMVLUE, SNOWEIGHT

XRCHART

MVGRANGE, RMVLUE, RNOWEIGHT

XSCHART

MVGRANGE, RMSDF, SMVLUE, SNOWEIGHT


When you use the MMR or MVGRANGE method, you can specify the number n of consecutive subgroup summary statistics from which moving ranges are computed by appending the number in parentheses to the keyword. For example, you can specify SMETHOD=MVGRANGE(4) to use moving ranges of four subgroup statistics. Values in the range are valid. By default, .

For more information about the different methods of estimating the process standard deviation, see the section Methods of Estimating the Standard Deviation.

SPECS=CAS-libref.data-table

specifies an input data table that contains process specification limits. CAS-libref.data-table is a two-level name, where CAS-libref refers to the caslib and session identifier, and data-table specifies the name of the input data table. For more information about this two-level name, see the DATA= option and the section Using CAS Sessions and CAS Engine Librefs. PROC SPC calculates capability indices for processes whose specifications are given in data-table.

This option is available only in the chart statements that produce charts for variables: BOXCHART, IRCHART, MCHART, MRCHART, RCHART, SCHART, XCHART, XRCHART, and XSCHART. For more information, see the sections SPECS= Data Table and Capability Indices.

SUBGROUPN=variable

specifies a variable in the input data table whose values specify the subgroup sample sizes. This option is available only in the CCHART, NPCHART, PCHART, and UCHART statements. You must specify this option in the NPCHART, PCHART, and UCHART statements. For the CCHART statement, the default subgroup sample size is 1.

TEST2RUN=run-length

specifies the length of the pattern for Test 2 that you request in the TESTS= and TESTS2= options. The run-length values that you can specify are 7, 8, 9, 11, 14, and 20. The form of the test for each run-length value is shown in the following table. By default, TEST2RUN=9. For more information, see the section Tests for Special Causes.

 

Number of Points on One

run-length

Side of the Central Line

7

7 in a row

8

8 in a row

9

9 in a row

11

At least 10 out of 11 in a row

14

At least 12 out of 14 in a row

20

At least 16 out of 20 in a row

TEST3RUN=run-length

specifies the length of the pattern for Test 3 that you request in the TESTS= and TESTS2= options. Test 3 searches for a pattern of steadily increasing or decreasing values, where the length of the pattern is at least the value of run-length. The values that you can specify for run-length are 6, 7, and 8. By default, TEST3RUN=6. For more information, see the section Tests for Special Causes.

TESTNSTD

applies the tests for special causes that you request in the TESTS= and TESTS2= options to standardized test statistics when the subgroup sample sizes are not constant. This method was suggested by Nelson (1994). For more information, see the section Tests for Special Causes. By default, the tests are not applied to data that have varying subgroup sample sizes.

TESTOVERLAP

applies tests for special causes (which you request in the TESTS= or TESTS2= option) to overlapping patterns of points.

This option modifies the way in which the search for a subsequent pattern is done when a pattern is encountered. If you omit this option, the search begins with the first subgroup after the current pattern ends. If you specify this option, the search begins with the second subgroup in the current pattern.

The following statements request Test 3, which detects six subgroup means in a row that steadily increase or decrease:

proc spc;
   xrchart / test=3;
   xrchart / test=3 testoverlap;
run;

Suppose that the subgroup means are steadily increasing for subgroups 5, 6, 7, 8, 9, 10, and 11. The first XRCHART statement signals that Test 3 is positive at subgroup 10 but not at subgroup 11, because the search for the next pattern begins with subgroup 11. The second XRCHART statement signals that Test 3 is positive at subgroup 10 and subgroup 11, because the search for the next pattern begins with subgroup 6 and thus finds a second pattern that ends with subgroup 11. For more information, see the section Tests for Special Causes.

Caution: Specifying TESTOVERLAP affects the interpretation of the standard tests for special causes, because a particular point can contribute to more than one positive test. Typically, you should not use this option.

TESTS=index-list

requests one or more tests for special causes, which are also known as runs tests, pattern tests, and Western Electric rules. These tests detect particular nonrandom patterns in the points that are plotted on the primary control chart. The occurrence of a pattern, referred to as a signal, suggests the presence of a special cause of variation.

Each pattern is defined in terms of Zones A, B, and C, which are constructed by dividing the interval between the control limits into six equally spaced subintervals. Zone A is the union of the subintervals immediately below the upper control limit and immediately above the lower control limit. Zone C is the union of the subintervals immediately above and below the central line. Zone B is the union of the subintervals between Zones A and C. For an illustration of test zones, see Figure 20.9.

Table 20.17 lists the standard tests that you can request by specifying this option. The tests are indexed according to the sequence used by Nelson (1984, 1985).

Table 20.17: Standard Tests for Special Causes

Index

Pattern Description

1

One point beyond Zone A (outside the control limits)

2

Nine points in a row in Zone C or beyond on one side of the central line (see the TEST2RUN= option)

3

Six points in a row that steadily increase or decrease (see the TEST3RUN= option)

4

Fourteen points in a row that alternate up and down

5

Two out of three points in a row in Zone A or beyond

6

Four out of five points in a row in Zone B or beyond

7

Fifteen points in a row in Zone C on either or both sides of the central line

8

Eight points in a row on either or both sides of the central line, with no points in Zone C


You can specify any combination of the eight indices by using an explicit list or an implicit list, as in the following example:

proc spc;
   xrchart / tests=1 2 3 4;
   xrchart / tests=1 to 4;
run;

The TESTS= option is available in all chart statements except the RCHART and SCHART statements. Use only tests 1, 2, 3, and 4 in the CCHART, NPCHART, PCHART, and UCHART statements. By default, the TESTS= option is not applied in any chart statement unless the control limits are limits. You can use the NO3SIGMACHECK option to request tests for special causes when you use the SIGMAS= option to specify control limits other than limits.

For more information about the TESTS= option, see the section Tests for Special Causes. Related options include TEST2RUN=, TEST3RUN=, TESTNSTD, TESTOVERLAP, and TESTS2=.

TESTS2=index-list

requests one or more tests for special causes for R charts or s charts. The syntax for the TESTS2= option is identical to the syntax for the TESTS= option. The TESTS2= option is available in the MRCHART, RCHART, SCHART, XRCHART, and XSCHART statements. For more information about the TESTS2= option, see the section Tests for Special Causes. Related options include TEST2RUN=, TEST3RUN=, TESTNSTD, TESTOVERLAP, and TESTS=.

Last updated: December 21, 2018