Chapter Contents |
Previous |
Next |
OUTPUT Statement |
See CPKCON3 in the SAS/QC Sample Library |
This example illustrates how you can use the OUTPUT statement to compute confidence limits for the capability index Cpk.
You can request the approximate confidence limits given by Bissell (1990) with the keywords CPKLCL and CPKUCL in the OUTPUT statement. However, this is not the only method that has been proposed for computing confidence limits for Cpk. Zhang, Stenback, and Wardrop (1990), referred to here as ZSW, proposed approximate confidence limits of the form
This assumes that is normally distributed. You can also compute approximate confidence limits based on equation (6) of ZSW, which provides an exact expression for the variance of .
The following program
uses the methods of Bissell (1990) and ZSW to
compute approximate confidence limits for Cpk
for the variable HARDNESS
in the data set TITANIUM (see
Example 7.1).
proc capability data=titanium noprint; var hardness; specs lsl=0.8 usl=2.4 gamma=0.95; output out=summary n = n mean = mean std = std lsl = lsl usl = usl cpk = cpk cpklcl = cpklcl cpkucl = cpkucl cpl = cpl cpu = cpu; data summary; set summary; length method $ 16; method = 'Bissell'; lcl = cpklcl; ucl = cpkucl; output; method = 'ZSW Equation 6'; level = 0.95; aux = probit( 1 - (1-level)/2 ); zsw = log(0.5*n-0.5) + ( 2*(lgamma(0.5*n-1)-lgamma(0.5*n-0.5)) ); zsw = sqrt((n-1)/(n-3)-exp(zsw)); lcl = cpk*(1-aux*zsw); ucl = cpk*(1+aux*zsw); output; method = 'ZSW Equation 8'; ds = 3*(cpu+cpl)/2; ms = 3*(cpl-cpu)/2; f1 = (1/3)*sqrt((n-1)/2)*gamma((n-2)/2)*(1/gamma((n-1)/2)); f2 = sqrt(2/n)*(1/gamma(0.5))*exp(-n*0.5*ms*ms); f3 = ms*(1-(2*probnorm(-sqrt(n)*ms))); ex = f1*(ds-f2-f3); sd = ((n-1)/(9*(n-3)))*(ds**2-(2*ds*(f2+f3))+ms**2+(1/n)); sd = sd-(ex*ex); sd = sqrt(sd); lcl = cpk-aux*sd; ucl = cpk+aux*sd; output; run; title 'Approximate 95% Confidence Limits for Cpk'; proc print data = summary noobs; var method lcl cpk ucl; run;
The results are shown in Output 7.2.1.
Output 7.2.1: Approximate Confidence Limits for Cpk
|
You can display the confidence limits computed using Bissell's approach on plots produced by the CAPABILITY procedure by specifying the keywords CPKLCL and CPKUCL in the INSET statement.
The following statements also compute an estimate of the index Cpk along with approximate limits using the SPECIALINDICES option:
proc capability data=titanium specialindices; var hardness; specs lsl=0.8 usl=2.4 gamma=0.95; run;Output 7.2.2: Approximate Confidence Limits for Cpk using the SPECIALINDICES option
Chapter Contents |
Previous |
Next |
Top |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.