The syntax for the OUTPUT statement is as follows:
OUTPUT
<OUT=SASdataset> <keyword1=names …keywordk=names> <percentileoptions> ;
You can use any number of OUTPUT statements in the CAPABILITY procedure. Each OUTPUT statement creates a new data set containing the statistics specified in that statement. When you use the OUTPUT statement, you must also use the VAR statement. In addition, the OUTPUT statement must contain at least one of the following:
You can use the OUT= option to specify the name of the output data set:
A keyword=names specification selects a statistic to be included in the output data set and gives names to the new variables that contain the statistics. Specify a keyword for each desired statistic, an equal sign, and the names of the variables to contain the statistic.
In the output data set, the first variable listed after a keyword in the OUTPUT statement contains the statistic for the first variable listed in the VAR statement; the second variable contains the statistic for the second variable in the VAR statement, and so on. The list of names following the equal sign can be shorter than the list of variables in the VAR statement. In this case, the procedure uses the names in the order in which the variables are listed in the VAR statement. Consider the following example:
proc capability noprint; var length width height; output out=summary mean=mlength mwidth; run;
The variables mlength
and mwidth
contain the means for length
and width
. The mean for height
is computed by the procedure but is not saved in the output data set.
Table 5.52 lists all keywords available in the OUTPUT statement grouped by type. Formulas for selected statistics are given in the section Details: CAPABILITY Procedure.
Table 5.52: OUTPUT Statement Statistic Keywords
Keyword 
Description 

Descriptive Statistics 

CSS 
sum of squares corrected for the mean 
CV 
percent coefficient of variation 
KURTOSIS  KURT 
kurtosis 
MAX 
largest (maximum) value 
MEAN 
mean 
MIN 
smallest (minimum) value 
MODE 
most frequent value (if not unique, the smallest mode) 
N 
number of observations on which calculations are based 
NMISS 
number of missing values 
NOBS 
number of observations 
RANGE 
range 
SKEWNESS  SKEW 
skewness 
STD  STDDEV 
standard deviation 
STDMEAN  STDERR 
standard error of the mean 
SUM 
sum 
SUMWGT 
sum of weights 
USS 
uncorrected sum of squares 
VAR 
variance 
Quantile Statistics 

MEDIAN  P50  Q2 
median (50th percentile) 
P1 
1st percentile 
P5 
5th percentile 
P10 
10th percentile 
P90 
90th percentile 
P95 
95th percentile 
P99 
99th percentile 
Q1  P25 
lower quartile (25th percentile) 
Q3  P75 
upper quartile (75th percentile) 
QRANGE 
interquartile range (Q3 – Q1) 
Robust Statistics 

GINI 
Gini’s mean difference 
MAD 
median absolute difference 
QN 
2nd variation of median absolute difference 
SN 
1st variation of median absolute difference 
STD_GINI 
standard deviation for Gini’s mean difference 
STD_MAD 
standard deviation for median absolute difference 
STD_QN 
standard deviation for the second variation of the median absolute difference 
STD_QRANGE 
estimate of the standard deviation, based on interquartile range 
STD_SN 
standard deviation for the first variation of the median absolute difference 
Hypothesis Test Statistics 

MSIGN 
sign statistic 
NORMAL 
test statistic for normality. If the sample size is less than or equal to 2000, this is the ShapiroWilk W statistic. Otherwise, it is the Kolmogorov D statistic. 
PNORMAL  PROBN 
pvalue for normality test 
PROBM 
probability of a greater absolute value for the sign statistic 
PROBS 
probability of a greater absolute value for the signed rank statistic 
PROBT 
twotailed pvalue for Student’s t statistic with degrees of freedom 
SIGNRANK 
signed rank statistic 
T 
Student’s t statistic to test the null hypothesis that the population mean is equal to 
Specification Limits and Related Statistics 

LSL 
lower specification limit 
PCTGTR 
percent of nonmissing observations greater than 
the upper specification limit 

PCTLSS 
percent of nonmissing observations less than 
the lower specification limit 

TARGET 
target value 
USL 
upper specification limit 
Capability Indices and Related Statistics 

CP 
capability index 
CPLCL 
lower confidence limit for 
CPUCL 
upper confidence limit for 
CPK 
capability index (also denoted CPK) 
CPKLCL 
lower confidence limit for 
CPKUCL 
upper confidence limit for 
CPL 
capability index CPL 
CPLLCL 
lower confidence limit for 
CPLUCL 
upper confidence limit for 
CPM 
capability index 
CPMLCL 
lower confidence limit for 
CPMUCL 
upper confidence limit for 
CPU 
capability index CPU 
CPULCL 
lower confidence limit for 
CPUUCL 
upper confidence limit for 
K 
capability index k (also denoted K) 
The CAPABILITY procedure automatically computes the 1st, 5th, 10th, 25th, 50th, 75th, 90th, 95th, and 99th percentiles for the data. You can save these statistics in an output data set by using keyword=names specifications. You can request additional percentiles by using the PCTLPTS= option. The following percentileoptions are related to these additional percentiles: