The syntax for the OUTPUT statement is as follows:
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 |
GEOMEAN |
Geometric mean |
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 Shapiro-Wilk W statistic. Otherwise, it is the Kolmogorov D statistic. |
PNORMAL | PROBN |
p-value 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 |
Two-tailed p-value 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 percentile-options are related to these additional percentiles: