Chapter Contents Previous Next
 OUTPUT Statement

## Example 7.1: Computing Nonstandard Capability Indices

 See CPCPMK in the SAS/QC Sample Library

In recent years, a number of process capability indices that have been proposed in the research literature are gradually being introduced in applications. As shown in this example, you can compute such indices in the DATA step after using the OUTPUT statement in the CAPABILITY procedure to save various summary statistics.

Hardness measurements (in scaled units) for 50 titanium samples are saved as values of the variable HARDNESS in the following SAS data set:

   data titanium;
label hardness = 'Hardness Measurement';
input hardness @@;
datalines;
1.38  1.49  1.43  1.60  1.59
1.34  1.44  1.64  1.83  1.57
1.45  1.74  1.61  1.39  1.63
1.73  1.61  1.35  1.51  1.47
1.46  1.41  1.56  1.40  1.58
1.43  1.53  1.53  1.58  1.62
1.58  1.46  1.26  1.57  1.41
1.53  1.36  1.63  1.36  1.66
1.49  1.55  1.67  1.41  1.39
1.75  1.37  1.36  1.86  1.49
;


The target value for hardness is 1.6, and the lower and upper specification limits are 0.8 and 2.4, respectively. The samples are produced by an in-control process, and the measurements are assumed to be normally distributed.

The following statements use the OUTPUT statement to save various descriptive statistics and an estimate of the index Cpm in a data set named INDICES:

   proc capability data=titanium noprint;
var hardness;
specs lsl=0.8 target=1.6 usl=2.4;
output out=indices
n       = n
mean    = avg
std     = std
var     = var
lsl     = lsl
target  = t
usl     = usl
pnormal = pnormal
cpm     = cpm ;
run;


In addition to Cpm, you want to report an estimate for the index Cpmk, which is defined as follows:

where d = ( USL - LSL ) / 2, m = ( USL + LSL ) / 2, and and are the mean and standard deviation of the normal distribution. Refer to Section 3.6 of Kotz and Johnson (1993). A natural estimator for Cpmk is

The following statements compute this estimate:

   data indices;
set indices;
d    = 0.5*( USL - LSL );
m    = 0.5*( USL + LSL );
num  = d - abs( avg - m );
den  = 3 * sqrt( (n-1)*var/n + (avg-t)*(avg-t) );
cpmk = num/den;

title 'Capability Analysis of Titanium Hardness';
proc print data=indices noobs;
var n avg std lsl t usl cpm cpmk pnormal;
run;


The results are listed in Output 7.1.1.

Output 7.1.1: Computation of Cpmk

 Capability Analysis of Titanium Hardness

 n avg std lsl t usl cpm cpmk pnormal 50 1.5212 0.13295 0.8 1.6 2.4 1.72545 1.56713 0.25111

Note that the p-value for the Kolmogorov-Smirnov test of normality is 0.27693, indicating that the assumption of normality is justified.

The following statements also compute an estimate of the index Cpm using the SPECIALINDICES option:

   proc capability data=titanium specialindices;
var hardness;
specs lsl=0.8 target=1.6 usl=2.4;
run;


Output 7.1.2: Computation of Cpmk using the SPECIALINDICES option

 The CAPABILITY Procedure Variable: hardness (Hardness Measurement)

 Process Capability Indices Index Value 95% Confidence Limits Cp 2.005745 1.609575 2.401129 CPL 1.808179 1.438675 2.175864 CPU 2.203311 1.757916 2.646912 Cpk 1.808179 1.438454 2.177904 Cpm 1.725446 1.410047 2.066027

 Chapter Contents Previous Next Top