Examples of regression models
/****************************************************************/
/* S A S S A M P L E L I B R A R Y */
/* */
/* NAME: RELRPLT2 */
/* TITLE: Examples of regression models */
/* and quantile (relation) plots */
/* PRODUCT: QC */
/* SYSTEM: ALL */
/* KEYS: */
/* PROCS: RELIABILITY */
/* DATA: Meeker & Escobar, Statistical Methods */
/* for Reliability Data */
/* REF: SAS/QC Software: The RELIABILITY Procedure */
/* */
/* */
/****************************************************************/
options nodate nostimer nonumber source2 ls=76 ps=80;
/*--- Superalloy data -------------------------------------------*/
/*--- Meeker & Escobar, Statistical Methods for Reliability Data */
/*--- table C.12, p. 638 ----------------------------------------*/
/*--- analysis on p. 441 ----------------------------------------*/
data alloy;
input pstress kcycles status$ @@;
x = log(pstress);
cen = ( status = 'C' );
datalines;
80.3 211.629 F 99.8 43.331 F
80.6 200.027 F 100.1 12.076 F
80.8 57.923 C 100.5 13.181 F
84.3 155.000 F 113.0 18.067 F
85.2 13.949 F 114.8 21.300 F
85.6 112.968 C 116.4 15.616 F
85.8 152.680 F 118.0 13.030 F
86.4 156.725 F 118.4 8.489 F
86.7 138.114 C 118.6 12.434 F
87.2 56.723 F 120.4 9.750 F
87.3 121.075 F 142.5 11.865 F
89.7 122.372 C 144.5 6.705 F
91.3 112.002 F 145.9 5.733 F
;
run;
proc reliability data = alloy;
distribution Weibull;
model kcycles*cen(1) = pstress pstress*pstress / relation = pow;
logscale pstress;
rplot kcycles*cen(1) = pstress /
fit=regression relation = pow
plotfit 1 10 50 90 99
slower=60 supper=160
lupper=500
cplotfit = ( red green blue purple grey )
lplotfit = ( 28 to 33 )
;
label pstress = "Pseudo-Stress";
run;
/*--- Device-A data ---------------------------------------------*/
/*--- Meeker & Escobar, Statistical Methods for Reliability Data */
/*--- p. 493 ----------------------------------------------------*/
data devicea;
input hours cen f temp @@;
datalines;
5000 1 30 10 1298 0 1 40 1390 0 1 40 3187 0 1 40
3241 0 1 40 3261 0 1 40 3313 0 1 40 4501 0 1 40
4568 0 1 40 4841 0 1 40 4982 0 1 40 5000 1 90 40
581 0 1 60 925 0 1 60 1432 0 1 60 1586 0 1 60
2452 0 1 60 2734 0 1 60 2772 0 1 60 4106 0 1 60
4674 0 1 60 5000 1 11 60 283 0 1 80 361 0 1 80
515 0 1 80 638 0 1 80 854 0 1 80 1024 0 1 80
1030 0 1 80 1045 0 1 80 1767 0 1 80 1777 0 1 80
1856 0 1 80 1951 0 1 80 1964 0 1 80 2884 0 1 80
5000 1 1 80
;
run;
proc reliability data=devicea;
distribution lognormal;
frequency f;
model hours*cen(1) = temp / relation = arr2;
rplot hours*cen(1) = temp / fit = regression relation = arr2
plotfit 1 5 10 plotdata
rcencolor=r
showmultiples ;
run;
/*--- Glass capacitor data --------------------------------------*/
/*--- Meeker & Escobar, Statistical Methods for Reliability Data */
/*--- p. 447 ----------------------------------------------------*/
data glass;
input Temp Voltage @;
do i = 1 to 4;
cen = 0;
input Hours @;
output;
end;
do i = 1 to 4;
cen = 1;
output;
end;
datalines;
170 200 439 904 1092 1105
170 250 572 690 904 1090
170 300 315 315 439 628
170 350 258 258 347 588
180 200 959 1065 1065 1087
180 250 216 315 455 473
180 300 241 315 332 380
180 350 241 241 435 455
;
run;
proc reliability data = glass;
distribution Weibull;
model Hours*cen(1) = Temp Voltage / relation = ( arr2 pow );
rplot Hours*cen(1) = Voltage / fit = regression
plotfit
Temp = 150, 170, 180;
run;