Nonnormal Process Data
/****************************************************************/
/* S A S S A M P L E L I B R A R Y */
/* */
/* NAME: SHWNONN */
/* TITLE: Nonnormal Process Data */
/* PRODUCT: QC */
/* SYSTEM: ALL */
/* KEYS: Shewhart Charts, Nonnormal Process Data, */
/* PROCS: SHEWHART CAPABILITY */
/* DATA: */
/* */
/* REF: SAS/QC Software: Usage and Reference, Version 6, */
/* First Edition, Volume 1 and Volume 2 */
/* */
/****************************************************************/
data Calls;
input Recnum Time;
datalines;
1 3.233
2 3.110
3 3.136
4 2.899
5 2.838
6 2.459
7 3.716
8 2.740
9 2.487
10 2.635
11 2.676
12 2.905
13 3.431
14 2.663
15 3.437
16 2.823
17 2.596
18 2.633
19 3.235
20 2.701
21 3.202
22 2.725
23 3.151
24 2.464
25 2.662
26 3.188
27 2.640
28 2.541
29 3.033
30 2.993
31 2.636
32 2.481
33 3.191
34 2.662
35 2.967
36 3.300
37 2.530
38 2.777
39 3.353
40 3.614
41 4.288
42 2.442
43 2.552
44 2.613
45 2.731
46 2.780
47 3.588
48 2.612
49 2.579
50 2.871
;
title;
proc print data=Calls noobs;
run;
ods graphics off;
title 'Standard Analysis of Individual Delays';
proc shewhart data=Calls;
irchart Time * Recnum /
rtmplot = schematic
outlimits = delaylim
nochart2 ;
label Recnum = 'Record Number'
Time = 'Delay in minutes' ;
run;
title;
proc print data=delaylim noobs;
var _var_ _subgrp_ _type_ _limitn_ _alpha_ _sigmas_
_lcli_ _mean_ _ucli_ _stddev_;
run;
title 'Lognormal Fit for Delay Distribution';
proc capability data=Calls noprint;
histogram Time /
lognormal(threshold=2.3 w=2)
outfit = Lnfit
nolegend ;
inset n = 'Number of Calls'
lognormal( sigma = 'Shape' (4.2)
zeta = 'Scale' (5.2)
theta ) / pos = ne;
label Time = 'Answering Delay (minutes)';
run;
title;
proc print data=Lnfit noobs;
var _var_ _curve_ _locatn_ _scale_ _shape1_ _midptn_
_adasq_ _adp_ _cvmwsq_ _cvmp_ _ksd_ _ksp_;
run;
data delaylim;
merge delaylim Lnfit;
drop _sigmas_ ;
_lcli_ = _locatn_ + exp(_scale_+probit(0.5*_alpha_)*_shape1_);
_ucli_ = _locatn_ + exp(_scale_+probit(1-.5*_alpha_)*_shape1_);
_mean_ = _locatn_ + exp(_scale_+0.5*_shape1_*_shape1_);
run;
title 'Lognormal Control Limits for Delays';
proc shewhart data=Calls limits=delaylim;
irchart Time*Recnum /
rtmplot = schematic
nochart2 ;
label Recnum = 'Record Number'
Time = 'Delay in minutes' ;
run;