Note: See Reading Spec Limits from an Input Data Set in the SAS/QC Sample Library.
You can specify specification limits either in the SPEC statement or in a SPEC= data set. In Computing Capability Indices, limits were specified in a SPEC statement. This example illustrates how to create a SPEC= data set to read specification limits with the SPEC= option in the PROC CAPABILITY statement.
Consider the drink can data presented in Computing Descriptive Statistics. Suppose, in addition to the fluid weight of each drink can, the weight of the can itself is stored in a variable named Cweight
, and both variables are saved in a data set called Can2
. A partial listing of Can2
follows:
proc print data=Can2(obs=5); run;
The following DATA step creates a data set named Limits
containing specification limits for the fluid weight and the can weight. Limits
has 4 variables (_VAR_
, _LSL_
, _USL_
, and _TARGET_
) and 2 observations. The first observation contains the specification limit information for the variable Weight
, and the second contains the specification limit information for the variable Cweight
.
data Limits; length _var_ $8; _var_ = 'Weight'; _lsl_ = 11.95; _target_ = 12; _usl_ = 12.05; output; _var_ = 'Cweight'; _lsl_ = 0.90; _target_ = 1; _usl_ = 1.10; output; run;
The following statements read the specification information from the Limits
data set into the CAPABILITY procedure by using the SPEC= option. These statements print summary statistics, capability indices,
and specification limit information for Weight
and Cweight
. Figure 5.1 and Figure 5.2 display the output for Weight
. Output 5.1.2 displays the output for Cweight
.
title 'Process Capability Analysis of Drink Can Data'; proc capability data=Can2 specs=Limits; var Cweight; run;
Output 5.1.2: Printed Output for Variable Cweight
Process Capability Analysis of Drink Can Data |
Moments | |||
---|---|---|---|
N | 100 | Sum Weights | 100 |
Mean | 1.004 | Sum Observations | 100.4 |
Std Deviation | 0.06330941 | Variance | 0.00400808 |
Skewness | -0.074821 | Kurtosis | -0.5433858 |
Uncorrected SS | 101.1984 | Corrected SS | 0.3968 |
Coeff Variation | 6.30571767 | Std Error Mean | 0.00633094 |