The CAPABILITY Procedure |
[See CAPSPEC2 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:
data Cans1; label Weight = "Fluid Weight (ounces)"; input Weight @@; datalines; 12.07 12.02 12.00 12.01 11.98 11.96 12.04 12.05 12.01 11.97 12.03 12.03 12.00 12.04 11.96 12.02 12.06 12.00 12.02 11.91 12.05 11.98 11.91 12.01 12.06 12.02 12.05 11.90 12.07 11.98 12.02 12.11 12.00 11.99 11.95 11.98 12.05 12.00 12.10 12.04 12.06 12.04 11.99 12.06 11.99 12.07 11.96 11.97 12.00 11.97 12.09 11.99 11.95 11.99 11.99 11.96 11.94 12.03 12.09 12.03 11.99 12.00 12.05 12.04 12.05 12.01 11.97 11.93 12.00 11.97 12.13 12.07 12.00 11.96 11.99 11.97 12.05 11.94 11.99 12.02 11.95 11.99 11.91 12.06 12.03 12.06 12.05 12.04 12.03 11.98 12.05 12.05 12.11 11.96 12.00 11.96 11.96 12.00 12.01 11.98 ; data Cans1a; label Cweight = "Can Weight (ounces)"; input Cweight @@; datalines; 1.07 0.86 1.06 1.08 1.02 0.98 1.04 1.08 1.03 1.03 0.96 1.04 1.00 0.92 0.95 0.93 0.99 1.01 1.00 1.08 1.09 0.98 0.96 0.94 0.90 1.01 0.99 1.12 1.08 1.03 0.97 0.99 1.01 1.12 0.99 0.96 1.00 0.92 0.91 1.04 0.90 1.11 1.01 0.98 0.97 1.10 1.07 1.13 0.96 0.95 1.02 1.15 1.08 1.09 0.90 1.04 1.05 1.00 0.90 1.04 1.00 1.00 1.03 0.88 0.98 1.01 0.97 0.90 1.02 0.95 1.03 1.00 1.08 0.91 0.97 0.98 1.03 0.94 1.07 0.98 1.07 0.98 0.93 0.99 0.91 1.02 0.95 1.05 0.88 1.04 1.04 1.04 1.03 1.08 0.99 0.96 1.05 0.92 1.08 1.07 ; data Can2; merge Cans1 Cans1a; run;
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;
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 |
Basic Statistical Measures | |||
---|---|---|---|
Location | Variability | ||
Mean | 1.004000 | Std Deviation | 0.06331 |
Median | 1.000000 | Variance | 0.00401 |
Mode | 1.040000 | Range | 0.29000 |
Interquartile Range | 0.08500 |
Tests for Location: Mu0=0 | ||||
---|---|---|---|---|
Test | Statistic | p Value | ||
Student's t | t | 158.5862 | Pr > |t| | <.0001 |
Sign | M | 50 | Pr >= |M| | <.0001 |
Signed Rank | S | 2525 | Pr >= |S| | <.0001 |
Tests for Normality | ||||
---|---|---|---|---|
Test | Statistic | p Value | ||
Shapiro-Wilk | W | 0.987310 | Pr < W | 0.4588 |
Kolmogorov-Smirnov | D | 0.061410 | Pr > D | >0.1500 |
Cramer-von Mises | W-Sq | 0.048175 | Pr > W-Sq | >0.2500 |
Anderson-Darling | A-Sq | 0.361939 | Pr > A-Sq | >0.2500 |
Quantiles (Definition 5) | |
---|---|
Quantile | Estimate |
100% Max | 1.150 |
99% | 1.140 |
95% | 1.105 |
90% | 1.080 |
75% Q3 | 1.045 |
50% Median | 1.000 |
25% Q1 | 0.960 |
10% | 0.910 |
5% | 0.900 |
1% | 0.870 |
0% Min | 0.860 |
Extreme Observations | |||
---|---|---|---|
Lowest | Highest | ||
Value | Obs | Value | Obs |
0.86 | 2 | 1.11 | 42 |
0.88 | 89 | 1.12 | 28 |
0.88 | 64 | 1.12 | 34 |
0.90 | 68 | 1.13 | 48 |
0.90 | 59 | 1.15 | 52 |
Copyright © SAS Institute, Inc. All Rights Reserved.