Resources

Getting Started Example 5 for PROC RELIABILITY


/****************************************************************/
/*          S A S   S A M P L E   L I B R A R Y                 */
/*                                                              */
/*    NAME: RELGS5                                              */
/*   TITLE: Getting Started Example 5 for PROC RELIABILITY      */
/* PRODUCT: QC                                                  */
/*  SYSTEM: ALL                                                 */
/*    KEYS: reliability, lifetime data                          */
/*   PROCS: RELIABILITY                                         */
/*    DATA:                                                     */
/*                                                              */
/* SUPPORT: sasgjj                                              */
/*     REF: PROC RELIABILITY, INTRODUCTORY EXAMPLE 5.           */
/*    MISC:                                                     */
/****************************************************************/


data bearing;
   input load Life @@;
   lload = log(load);
   datalines;
 .87 1.67    .87 2.2    .87 2.51    .87 3.0    .87 3.9
 .87 4.7     .87 7.53   .87 14.7    .87 27.76  .87 37.4
 .99  .8     .99 1.0    .99 1.37    .99 2.25   .99 2.95
 .99 3.7     .99 6.07   .99 6.65    .99 7.05   .99 7.37
1.09  .18   1.09  .2   1.09  .24   1.09  .26  1.09  .32
1.09  .32   1.09  .42  1.09  .44   1.09  .88  1.18  .073
1.18  .098  1.18  .117 1.18  .135  1.18  .175 1.18  .262
1.18  .270  1.18  .350 1.18  .386  1.18  .456
;

proc print data=Bearing;
run;

ods output modobstats = Residual;
proc reliability data=bearing;
   distribution Weibull;
   model life = lload /  covb
                         corrb
                         obstats
                         ;
run;

proc print data=Residual;
run;

proc reliability data=residual;
   distribution ev;
   probplot sresid;
run;

data alloy;
   input pstress kCycles status$ @@;
   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
;

ods output ModObstats = Resids;
proc reliability data = alloy;
   distribution Weibull;
   model kcycles*cen(1) = pstress pstress*pstress / Relation = Pow Obstats;
   logscale pstress;
   rplot kcycles*cen(1) = pstress /  fit=regression
                                     relation = pow
                                     plotfit  10 50 90
                                     slower=60 supper=160
                                     lupper=500;

   label pstress = "Pseudo-Stress";
   label kcycles = "Thousands of Cycles";
run;

proc reliability data = Resids;
   distribution ev;
   pplot sresid*cen(1) / nofit;
run;

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
;

proc reliability data = glass;
   distribution Weibull;
   model Hours*cen(1) = temp voltage temp * voltage;
   pplot Hours*cen(1) = ( temp voltage ) / fit = model
                                           overlay
                                           noconf
                                           lupper = 2000;
run;

proc reliability data = glass;
   distribution Weibull;
   model Hours*cen(1) = temp voltage temp * voltage;
   rplot Hours*cen(1) = voltage / fit = regression(temp = 150, 170, 180)
                                  plotfit;
run;

data Voltage;
   input Hours Mode$ @@;
   if Mode = 'Cen' then Status = 1;
   else Status = 0;
   datalines;
2   E   3   E   5   E   8   E   13  Cen 21  E
28  E   31  E   31  Cen 52  Cen 53  Cen 64  E
67  Cen 69  E   76  E   78  Cen 104 E   113 Cen
119 E   135 Cen 144 E   157 Cen 160 E   168 D
179 Cen 191 D   203 D   211 D   221 E   226 D
236 E   241 Cen 257 Cen 261 D   264 D   278 D
282 E   284 D   286 D   298 D   303 E   314 D
317 D   318 D   320 D   327 D   328 D   328 D
348 D   348 Cen 350 D   360 D   369 D   377 D
387 D   392 D   412 D   446 D
;

proc reliability data=Voltage;
   distribution Weibull;
   pplot Hours*Status(1) / pref(intersect) = 10
                           preflabel = ('10th Percentile')
                           survtime = 100 200 300 400 500 1000
                           lupper = 500;
   fmode combine = Mode( 'D' 'E' );
run;

proc reliability data=Voltage;
   distribution Weibull;
   pplot Hours*Status(1) / pref(intersect) = 10
                           preflabel = ('10th Percentile')
                           survtime = 100 200 300 400 500 1000
                           noconf
                           lupper = 500;
   fmode combine = Mode( 'D' 'E' ) / plotmodes;
run;