Approx. Two-Sided Confidence Limits for Cpm
/****************************************************************/
/* S A S S A M P L E L I B R A R Y */
/* */
/* NAME: CPMCON */
/* TITLE: Approx. Two-Sided Confidence Limits for Cpm */
/* PRODUCT: QC */
/* SYSTEM: ALL */
/* KEYS: Capability Analysis, Capability Indices, */
/* PROCS: CAPABILITY */
/* DATA: */
/* */
/* REF: Boyles R. A. (1991). "The Taguchi Capability */
/* Index". Journal of Quality Technology 23, pp. */
/* 107-126. */
/* */
/* Chan, L. K., Cheng, S. W. and Spiring, F. A. */
/* (1990). "A New Measure of Process Capability: Cpm". */
/* Journal of Quality Technology 30, pp. 162-175. */
/* */
/* Kushler, R. H. and Hurley, P. (1992). "Confidence */
/* Bounds for Capability Indices". Journal of Quality */
/* Technology 24, pp. 188-195. */
/* */
/* NOTES: This program calculates confidence limits for Cpm */
/* using the method of Boyles (1991). Note that this */
/* method is approximate, and it assumes that the */
/* target is midway between the specification limits. */
/* Also note that Boyles' point estimator for Cpm */
/* (denoted CPM in the program) differs slightly from */
/* the point estimator for Cpm (denoted CPM) used by */
/* Chan et al. (1988) and computed by the CAPABILITY */
/* procedure. Both CPMB are printed by this program. */
/* See Kushler and Hurley (1992) for an assessment of */
/* Boyles' method. */
/* */
/* MISC: */
/* */
/* Examples in the documentation were created using the */
/* statement: ods listing style=statistical; */
/* */
/****************************************************************/
options ps=60 ls=80;
data a;
input x @@;
cards;
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
;
proc capability data=a noprint;
var x;
specs lsl=0.8 target=1.6 usl=2.4;
output out = summary
n = n
mean = mean
std = std
cpm = cpm
lsl = lsl
target = t
usl = usl
;
data summary;
set summary;
* Assign confidence level;
level = 0.95;
* Compute two-sided confidence interval;
tau = sqrt((((n-1)/n)*std*std)+((mean-t)**2));
cpmb = (usl-lsl)/(6*tau);
psi = (mean-T)/std;
nu = (n*(1+psi*psi)**2)/(1+2*psi*psi);
lcl = cpmb*sqrt(cinv((1-level)/2,nu)/nu);
ucl = cpmb*sqrt(cinv(1-((1-level)/2),nu)/nu);
output;
run;
title 'Approximate 95% Confidence Limits for Cpm';
proc print data = summary noobs;
var lcl cpm cpmb ucl n mean std lsl t usl;
run;
title;