Chapter Contents Previous Next
 PROC CAPABILITY and General Statements

## Example 1.1: Reading Specification Limits

 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 at "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 listing of CAN2 follows:

Output 1.1.1: The Data Set CAN2

 Obs weight cweight 1 12.07 1.07 2 12.02 0.86 3 12.00 1.06 4 12.01 1.08 5 11.98 1.02 6 11.96 0.98 7 12.04 1.04 8 12.05 1.08 9 12.01 1.03 10 11.97 1.03 11 12.03 0.96 12 12.03 1.04 13 12.00 1.00 14 12.04 0.92 15 11.96 0.95 16 12.02 0.93 17 12.06 0.99 18 12.00 1.01 19 12.02 1.00 20 11.91 1.08 21 12.05 1.09 22 11.98 0.98 23 11.91 0.96 24 12.01 0.94 25 12.06 0.90 26 12.02 1.01 27 12.05 0.99 28 11.90 1.12 29 12.07 1.08 30 11.98 1.03 31 12.02 0.97 32 12.11 0.99 33 12.00 1.01 34 11.99 1.12 35 11.95 0.99 36 11.98 0.96 37 12.05 1.00 38 12.00 0.92 39 12.10 0.91 40 12.04 1.04 41 12.06 0.90 42 12.04 1.11 43 11.99 1.01 44 12.06 0.98 45 11.99 0.97 46 12.07 1.10 47 11.96 1.07 48 11.97 1.13 49 12.00 0.96 50 11.97 0.95 51 12.09 1.02 52 11.99 1.15 53 11.95 1.08 54 11.99 1.09 55 11.99 0.90 56 11.96 1.04 57 11.94 1.05 58 12.03 1.00 59 12.09 0.90 60 12.03 1.04 61 11.99 1.00 62 12.00 1.00 63 12.05 1.03 64 12.04 0.88 65 12.05 0.98 66 12.01 1.01 67 11.97 0.97 68 11.93 0.90 69 12.00 1.02 70 11.97 0.95 71 12.13 1.03 72 12.07 1.00 73 12.00 1.08 74 11.96 0.91 75 11.99 0.97 76 11.97 0.98 77 12.05 1.03 78 11.94 0.94 79 11.99 1.07 80 12.02 0.98 81 11.95 1.07 82 11.99 0.98 83 11.91 0.93 84 12.06 0.99 85 12.03 0.91 86 12.06 1.02 87 12.05 0.95 88 12.04 1.05 89 12.03 0.88 90 11.98 1.04 91 12.05 1.04 92 12.05 1.04 93 12.11 1.03 94 11.96 1.08 95 12.00 0.99 96 11.96 0.96 97 11.96 1.05 98 12.00 0.92 99 12.01 1.08 100 11.98 1.07

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 using the SPEC= option. These statements print summary statistics, capability indices, and specification limit information for WEIGHT and CWEIGHT. Figure 1.1 and Figure 1.2 display the output for WEIGHT. Output 1.1.2 displays the output for CWEIGHT.

```   title 'Process Capability Analysis of Drink Can Data';
proc capability data=can2 specs=limits;
var weight cweight;
run;
```

Output 1.1.2: Printed Output for Variable CWEIGHT

 Process Capability Analysis of Drink Can Data

 The CAPABILITY Procedure Variable: cweight (Can Weight (ounces))

 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

 NOTE: The mode displayed is the smallest of 2 modes with a count of 8.

 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.459 Kolmogorov-Smirnov D 0.061410 Pr > D >0.150 Cramer-von Mises W-Sq 0.048175 Pr > W-Sq >0.250 Anderson-Darling A-Sq 0.361939 Pr > A-Sq >0.250

 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

 Specification Limits Limit Percent Lower (LSL) 0.900000 % < LSL 3.00000 Target 1.000000 % Between 92.00000 Upper (USL) 1.100000 % > USL 5.00000

 Process Capability Indices Index Value 95% Confidence Limits Cp 0.526515 0.453237 0.599670 CPL 0.547575 0.446607 0.647299 CPU 0.505454 0.408856 0.600808 Cpk 0.505454 0.409407 0.601501 Cpm 0.525467 0.454973 0.601113

 Chapter Contents Previous Next Top