PROC CAPABILITY and General Statements

PROC CAPABILITY Statement

The syntax for the PROC CAPABILITY statement is as follows:

The following section lists all options. See the section Dictionary of Options for detailed information.

Summary of Options

Table 5.2 lists all the PROC CAPABILITY options by function.

Table 5.2: PROC CAPABILITY Statement Options

Option

Description

Input Data Set Options

ANNOTATE=

specifies input data set containing annotation information

DATA=

specifies input data set

EXCLNPWGT

specifies that non-positive weights are to be excluded

NOBYSPECS

specifies that specification limits in SPEC= data set are to be applied to all BY groups

SPEC=

specifies input data set with specification limits

Plotting and Graphics Options

FORMCHAR(index)=

defines characters used for features on legacy line printer plots

GOUT=

specifies catalog for saving traditional graphics output

LINEPRINTER

requests legacy line printer plots

Computational Options

PCTLDEF=

specifies definition used to calculate percentiles

ROUND=

specifies units used to round variable values

VARDEF=

specifies divisor used to calculate variances and standard deviations

Data Summary Options

ALL

requests all tables

FREQ

requests frequency table

MODES

requests table of modes

NEXTROBS=

requests table of n lowest, n highest observations

NEXTRVAL=

requests table of n lowest, n highest values

Output Options

NOPRINT

suppresses printed output

OUTTABLE=

creates an output data set containing univariate statistics and capability indices in tabular form

Hypothesis Testing Options

MU0=

specifies mean for null hypothesis in tests for location

LOCCOUNT

requests table of counts used in sign test and signed rank test

NORMALTEST

performs tests for normality

Robust Estimation Options

ROBUSTSCALE

requests table of robust measures of scale

TRIMMED=(trimmed-options)

requests table of trimmed means

WINSORIZED=(Winsorized-options)

requests table of Winsorized means

TRIMMED-Options

ALPHA=

specifies confidence level

TYPE=

specifies type of confidence limit

WINSORIZED-Options

ALPHA=

specifies confidence level

TYPE=

specifies type of confidence limit

Capability Index Options

CPMA=

(obsolete) specifies a for Cpm(a)

CHECKINDICES

requests test of normality in conjunction with standard indices

SPECIALINDICES

requests table of specialized indices including Boyles’ $C_{pm}$, $C_{jkp}$, $C_{pmk}$, $C_{pm}(a)$, and Wright’s $C_ s$

CHECKINDICES-Options

ALPHA=

specifies cutoff probability for p-values for test for normality used in conjunction with process capability indices

TEST=

specifies test for normality (Shapiro-Wilk, Kolmogorov-Smirnov, Anderson-Darling, Cramér-von Mises, or no test)

Confidence Limit Options

ALPHA=

specifies level for all confidence limits

CIBASIC

requests confidence limits for the mean, standard deviation, variance

CIINDICES

specifies level and type of confidence limits for capability indices

CIPCTLDF

requests distribution-free confidence limits for percentiles

CIPCTLNORMAL

requests confidence limits for percentiles assuming normality

CIPROBEX

requests confidence limits for the probability of exceeding specifications

CIBASIC-Options

ALPHA=

specifies confidence level

TYPE=

specifies type of confidence limit

CIINDICES-Options

ALPHA=

specifies confidence level

TYPE=

specifies type of confidence limit

CIPCTLDF-Options

ALPHA=

specifies confidence level

TYPE=

specifies type of confidence limit

CIPCTLNORMAL-Options

ALPHA=

specifies confidence level

TYPE=

specifies type of confidence limit

CIPROBEX-Options

ALPHA=

specifies confidence level

TYPE=

specifies type of confidence limit


Dictionary of Options

The following entries provide detailed descriptions of the options in the PROC CAPABILITY statement.

ALL

requests all of the tables generated by the FREQ, MODES, NEXTRVAL=5, CIBASIC, CIPCTLDF, and CIPCTLNORMAL options. If a WEIGHT statement is not used, the ALL option also requests the tables generated by the LOCCOUNT, NORMALTEST, ROBUSTSCALE, TRIMMED=.25, and WINSORIZED=.25 options. PROC CAPABILITY uses any values that you specify with the ALPHA=, MUO=, NEXTRVAL=, CIBASIC, CIPCTLDF, CIPCTLNORMAL, TRIMMED=, or WINSORIZED= options in conjunction with the ALL option.

ALPHA=value

specifies the default confidence level for all confidence limits computed by the CAPABILITY procedure. The coverage percent for the confidence limits is $(1-\mi {value}) 100$. For example, ALPHA=0.10 results in 90% confidence limits. The default value is 0.05.

Note that specialized ALPHA= options are available for a number of confidence interval options. For example, you can specify CIBASIC( ALPHA=0.10 ) to request a table of Basic Confidence Limits at the 90% level. The default values of these options default to the value of the general ALPHA= option.

ANNOTATE=SAS-data-set
ANNO=SAS-data-set

specifies an input data set containing annotate variables as described in SAS/GRAPH documentation. You can use this data set to add features to traditional graphics. Use this data set only when creating traditional graphics; it is ignored when the LINEPRINTER option is specified and when ODS Graphics is in effect. Features provided in this data set are added to every plot produced in the current run of the procedure.

CHECKINDICES<(TEST = SW | KS | AD | CVM | NONE> <ALPHA=value>)

specifies the test of normality used in conjunction with process capability indices that are displayed in the Process Capability Indices table. If the p-value for the test is less than the cutoff probability value specified with the ALPHA= option, a warning is added to the table, as illustrated in Figure 5.3. See Tests for Normality for details concerning the test.

proc capability data=Process;
var p2;
specs lsl=10
      usl=275;
run;

Figure 5.3: Warning Message Printed with Capability Indices

Process Capability Analysis of Fluid Weight

The CAPABILITY Procedure
Variable: P2

Process Capability Indices
Index Value 95% Confidence Limits
Cp 0.541072 0.388938 0.692946
CPL 0.642426 0.417087 0.862984
CPU 0.439718 0.257339 0.617184
Cpk 0.439718 0.259310 0.620126

Warning: Normality is rejected for alpha = 0.05 using the Shapiro-Wilk test



ALPHA=value

specifies the cutoff probability for p-values for a test for normality used in conjunction with process capability indices. The value must be between zero and 0.5. The default value is 0.05.

TEST = SW | KS | AD | CVM | NONE

specifies the test of normality used in conjunction with process capability indices that are displayed in the Process Capability Indices table. The tests available are Shapiro-Wilk (SW), Kolmogorov-Smirnov (KS), Anderson-Darling (AD), and Cramér-von Mises (CVM). The default test is the Shapiro-Wilk test if the sample size is less than or equal to 2000 and the Kolmogorov-Smirnov test if the sample size is greater than 2000.

CIBASIC<(<TYPE=keyword> <ALPHA=value>)>

requests confidence limits for the mean, standard deviation, and variance based on the assumption that the data are normally distributed. With large sample sizes, this assumption is not required for confidence limits for the mean.

ALPHA=value

specifies the confidence level. The coverage percent for the confidence limits is $(1-\mi {value}) 100$. For example, ALPHA=0.10 requests 90% confidence limits. The default value is 0.05.

TYPE=keyword

specifies the type of confidence limit, where keyword is LOWER, UPPER, or TWOSIDED. The default value is TWOSIDED.

CIINDICES<(TYPE=keyword><ALPHA=value>)

specifies the type and level of the confidence limits for standard capability indices displayed in the table labeled Process Capability Indices.

ALPHA=value

specifies the confidence level. The coverage percent for the confidence limits is $(1-\mi {value}) 100$. For example, ALPHA=0.10 requests 90% confidence limits. The default value is 0.05.

TYPE=keyword

specifies the type of confidence limit, where keyword is LOWER, UPPER, or TWOSIDED. The default value is TWOSIDED.

CIPCTLDF<(TYPE=keyword><ALPHA=value>)
CIQUANTDF<(TYPE=keyword><ALPHA=value>)

requests confidence limits for quantiles computed using a distribution-free method. In other words, no specific parametric distribution (such as the normal) is assumed for the data. Order statistics are used to compute the confidence limits as described in Section 5.2 of Hahn and Meeker (1991). This option is not available if you specify a WEIGHT statement.

ALPHA=value

specifies the confidence level. The coverage percent for the confidence limits is $(1-\mi {value}) 100$. For example, ALPHA=0.10 requests 90% confidence limits. The default value is 0.05.

TYPE=keyword

specifies the type of confidence limit, where keyword is LOWER, UPPER, SYMMETRIC, or ASYMMETRIC. The default value is SYMMETRIC.

CIPCTLNORMAL<(TYPE=keyword><ALPHA=value>)
CIQUANTNORMAL<(TYPE=keyword> <ALPHA=value>)

requests confidence limits for quantiles based on the assumption that the data are normally distributed. The computational method is described in Section 4.4.1 of Hahn and Meeker (1991) and uses the noncentral t distribution as given by Odeh and Owen (1980). This option is not available if you specify a WEIGHT statement.

ALPHA=value

specifies the confidence level. The coverage percent for the confidence limits is $(1-\mi {value}) 100$. For example, ALPHA=0.10 requests 90% confidence limits. The default value is 0.05.

TYPE=keyword

specifies the type of confidence limit, where keyword is LOWER, UPPER, or TWOSIDED. The default value is TWOSIDED.

CIPROBEX<(TYPE=keyword><ALPHA=value>)

requests confidence limits for $Pr[ X \leq \mbox{LSL} ]$ and $Pr[ X \geq \mbox{USL} ]$, where X is the analysis variable, LSL is the lower specification limit, and USL is the upper specification limit. The computational method, which assumes that X is normally distributed, is described in Section 4.5 of Hahn and Meeker (1991) and uses the noncentral t distribution as given by Odeh and Owen (1980). This option is not available if you specify a WEIGHT statement.

ALPHA=value

specifies the confidence level. The coverage percent for the confidence limits is $(1-\mi {value}) 100$. For example, ALPHA=0.10 requests 90% confidence limits. The default value is 0.05.

TYPE=keyword

specifies the type of confidence limit, where keyword is LOWER, UPPER, or TWOSIDED. The default value is TWOSIDED.

CPMA=value

specifies the value of the parameter a for the capability index $C_{pm}(a)$. This option has been superseded by the SPECIALINDICES(CPMA=) option.

DATA=SAS-data-set

specifies the input data set containing the observations to be analyzed. If the DATA= option is omitted, the procedure uses the most recently created SAS data set.

DEF=index

is an alias for the PCTLDEF= option. See the entry for the PCTLDEF= option.

EXCLNPWGT

excludes observations with non-positive weight values (zero or nonnegative) for the analysis. By default, PROC CAPABILITY treats observations with negative weights like those with zero weights and counts them in the total number of observations. This option is applicable only if you specify a WEIGHT statement.

FORMCHAR(index)='string'

defines characters used for features on legacy line printer plots, where index is a number ranging from 1 to 11, and string is a character or hexadecimal string. This option is ignored unless you specify the LINEPRINTER option in the PROC CAPABILITY statement.

The index identifies which features are controlled with the string characters, as discussed in the table that follows. If you specify the FORMCHAR= option omitting the index, the string controls all 11 features.

By default, the form character list specified with the SAS system option FORMCHAR= is used; otherwise, the default is FORMCHAR=’|—-|+|—’. If you print to a PC screen or your device supports the ASCII symbol set (1 or 2), the following is recommended:

formchar='B3,C4,DA,C2,BF,C3,C5,B4,C0,C1,D9'X

As an example, suppose you want to plot the data values of the empirical cumulative distribution function with asterisks (*). You can change the appropriate character by using the following:

formchar(2)='*'

Note that the FORMCHAR= option in the PROC CAPABILITY statement enables you to temporarily override the values of the SAS system option with the same name. The values of the SAS system option are not altered by using the FORMCHAR= option in PROC CAPABILITY statement.

The features associated with values of index are as follows:

Value of

   

index

Description of Character

Chart Feature

1

vertical bar

frame, ecdf line, HREF= lines

2

horizontal bar

frame, ecdf line, VREF= lines

3

box character (upper left)

frame, ecdf line, histogram bars

4

box character (upper middle)

histogram bars, tick marks (horizontal axis)

5

box character (upper right)

frame, histogram bars

6

box character (middle left)

histogram bars

7

box character (middle middle)

not used

8

box character (middle right)

histogram bars, tick marks (vertical axis)

9

box character (lower left)

frame

10

box character (lower middle)

histogram bars

11

box character (lower right)

frame, ecdf line

FREQ

requests a frequency table in the printed output that contains the variable values, frequencies, percentages, and cumulative percentages. See Figure 5.2 for an example.

GOUT=graphics-catalog

specifies a graphics catalog in which to save traditional graphics output. This option is ignored unless you are producing traditional graphics.

LINEPRINTER

requests that legacy line printer plots be produced by the CDFPLOT, HISTOGRAM, PROBPLOT, PPPLOT, and QQPLOT statements. The CLASS and COMPHISTOGRAM statements cannot be used when the LINEPRINTER option is specified.

LOCCOUNT

requests a table with the number of observations greater than, not equal to, and less than the value of MUO=. PROC CAPABILITY uses these values to construct the sign test and signed rank test. This option is not available if you specify a WEIGHT statement.

MODES
MODE

requests a table of all possible modes. By default, when the data contains multiple modes, PROC CAPABILITY displays the lowest mode in the table of basic statistical measures. When all values are unique, PROC CAPABILITY does not produce a table of modes.

MU0=value(s)
LOCATION=value(s)

specifies the value of the mean or location parameter ($\mu _ o$) in the null hypothesis for the tests summarized in the table labeled Tests for Location: Mu0=value. If you specify a single value, PROC CAPABILITY tests the same null hypothesis for all analysis variables. If you specify multiple values, a VAR statement is required, and PROC CAPABILITY tests a different null hypothesis for each analysis variable by matching the VAR variables with the values in the corresponding order. The default value is 0.

NEXTROBS=n

specifies the number of extreme observations in the table labeled Extreme Observations. The table lists the n lowest observations and the n highest observations. The default value is 5. The value of n must be an integer between 0 and half the number of observations. You can specify NEXTROBS=0 to suppress the table.

NEXTRVAL=n

requests the table labeled Extreme Values and specifies the number of extreme values in the table. The table lists the n lowest unique values and the n highest unique values. The value of n must be an integer between 0 and half the maximum number of observations. By default, n = 0 and no table is displayed.

NOBYSPECS

specifies that specification limits in SPEC= data set be applied to all BY groups. If you use a BY statement and specify a SPEC= data set that does not contain the BY variables, you must specify the NOBYSPECS option.

NOPRINT

suppresses the tables of descriptive statistics and capability indices which are created by the PROC CAPABILITY statement. The NOPRINT option does not suppress the tables created by the INTERVALS or plot statements. You can use the NOPRINT options in these statements to suppress the creation of their tables.

NORMALTEST
NORMAL

requests a table of Tests for Normality for each of the analysis variables. The table provides test statistics and p-values for the Shapiro-Wilk test (provided the sample size is less than or equal to 2000), the Kolmogorov-Smirnov test, the Anderson-Darling test, and the Cramér-von Mises test. See Tests for Normality for details. If specification limits are provided, the NORMALTEST option is assumed.

OUTTABLE=SAS-data-set

specifies an output data set that contains univariate statistics and capability indices arranged in tabular form. See OUTTABLE= Data Set for details.

PCTLDEF=index
DEF=index

specifies one of five definitions used to calculate percentiles. The value of index can be 1, 2, 3, 4, or 5. See Percentile Computations for details. By default, PCTLDEF=5.

ROBUSTSCALE

requests a table of robust measures of scale. These measures include the interquartile range, Gini’s mean difference, the median absolute deviation about the median (MAD), and two statistics proposed by Rousseeuw and Croux (1993), $Q_ n$, and $S_ n$. This option is not available if you specify a WEIGHT statement.

ROUND=value-list

specifies units used to round variable values. The ROUND= option reduces the number of unique values for each variable and hence reduces the memory required for temporary storage. Values must be greater than 0 for rounding to occur.

If you use only one value, the procedure uses this unit for all variables. If you use a list of values, you must also use a VAR statement. The procedure then uses the roundoff values for variables in the order given in the VAR statement. For example, the following statements specify a roundoff value of 1 for Yieldstrength and a roundoff value of 0.5 for TENSTREN.

proc capability round=1 0.5;
   var Yieldstrength tenstren;
run;

When a variable value is midway between the two nearest rounded points, the value is rounded to the nearest even multiple of the roundoff value. For example, with a roundoff value of 1, the variable values of –2.5, –2.2, and –1.5 are rounded to –2; the values of –0.5, 0.2, and 0.5 are rounded to 0; and the values of 0.6, 1.2, and 1.4 are rounded to 1.

SPECIALINDICES

requests a table of specialized process capability indices. These indices include k, Boyles’ modified $C_{pm}$ (also denoted as $C_{pm}+$), $C_{jkp}$, $C_{pm}(a)$, $C_{p}(5.15)$, $C_{pk}(5.15)$, $C_{pmk}$, Wright’s $C_{s}$, Boyles’ $S_{jkp}$, $C_{pp}$, $C_{pp}^{}$, $C_{pg}$, $C_{pq}$, $C_ p^ W$, $C_{pk}^ W$, $C_{pm}^ W$, $C_{pc}$, and Vännmann’s $C_ p(u,v)$ and $C_ p(v)$.

You can provide values for the parameters a for $C_{pm}(a)$, u and v for $C_ p(u,v)$ and $C_ p(v)$, and for the $\gamma $ multiplier for $C_ s$ by specifying the following options in parentheses after the SPECIALINDICES option.

CPMA=value

specifies the value of the parameter a for the capability index $C_{pm}(a)$ described in Section 3.7 of Kotz and Johnson (1993). The value must be positive. The default value is 0.5. The existing CPMA= option in the PROC CAPABILITY statement is considered obsolete but still works.

CPU=value

specifies the value of the parameter u for Vännmann’s capability index $C_ p(u,v)$. The value must be greater than or equal to zero. The default value is zero.

CPV=value

specifies the value of the parameter v for Vännmann’s capability indices $C_ p(u,v)$ and $C_ p(v)$. The value must be greater than or equal to zero. The default value is 4.

CSGAMMA=value

specifies the value of the $\gamma $ multiplier suggested by Chen and Kotz (1996) for Wright’s capability index $C_ s$. The value must be greater than zero. The default value is 1.

SPEC=SAS-data-set
SPECS=SAS-data-set

specifies an input data set containing specification limits for each of the variables in the VAR statement. This option is an alternative to the SPEC statement, which also provides specification limits. See SPEC= Data Set for details on SPEC= data sets, and Example 5.1 for an example. If you use both the SPEC= option and a SPEC statement, the SPEC= option is ignored.

TRIMMED=values(s) <(TYPE=keyword><ALPHA=value>)

requests a table of trimmed means, where each value specifies the number or the proportion of trimmed observations. If the value is the number n of trimmed observations, n must be between 0 and half the number of nonmissing observations. If the value is a proportion p between 0 and 0.5, the number of observations trimmed is the smallest integer greater than or equal to $np$, where n is the number of observations. To obtain confidence limits for the mean and the student t-test, you must use the default value of VARDEF= which is DF. The TRIMMED= option is not available if you specify a WEIGHT statement.

ALPHA=value

specifies the confidence level. The coverage percent is $(1-\mi {value}) 100$. For example, ALPHA=0.10 requests a 90% confidence limit. The default value is 0.05.

TYPE=keyword

specifies the type of confidence limit, where keyword is LOWER, UPPER, or TWOSIDED. The default value is TWOSIDED.

VARDEF=DF | N | WDF | WEIGHT | WGT

specifies the divisor used in calculating variances and standard deviations. The values and associated divisors are shown in the following table. By default, VARDEF=DF.

Value

Divisor

Formula

DF

degrees of freedom

$n - 1$

N

number of observations

n

WEIGHT | WGT

sum of weight

$\sum _ i w_ i$

WDF

sum of weights minus one

($\sum _ i w_ i ) - 1$

WINSORIZED=values(s) <(<TYPE=keyword> <ALPHA=value>)>
WINSOR=values(s) <(<TYPE=keyword> <ALPHA=value>)>

requests a table of winsorized means, where each value specifies the number or the proportion of winsorized observations. If the value is the number n of winsorized observations, n must be between 0 and half the number of nonmissing observations. If the value is a proportion p between 0 and 0.5, the number of observations winsorized is the smallest integer greater than or equal to $np$, where n is the number of observations. To obtain confidence limits for the mean and the student t-test, you must use the default value of VARDEF= which is DF. The WINSORIZED= option is not available if you specify a WEIGHT statement.

ALPHA=value

specifies the confidence level. The coverage percent is $(1-\mi {value}) 100$. For example, ALPHA=0.10 results in a 90% confidence limit. The default value is 0.05.

TYPE=keyword

specifies the type of confidence limit, where keyword is LOWER, UPPER, or TWOSIDED. The default value is TWOSIDED.