Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
The LIFEREG Procedure

Example 36.1: Motorette Failure

This example fits a Weibull model and a lognormal model to the example given in Kalbfleisch and Prentice (1980, p. 5). An output data set called models is specified to contain the parameter estimates. By default, the natural log of the variable time is used by the procedure as the response. After this log transformation, the Weibull model is fit using the extreme value baseline distribution, and the lognormal is fit using the normal baseline distribution.

Since the extreme value and normal distributions do not contain any shape parameters, the variable SHAPE1 is missing in the models data set. An additional output data set, out, is requested that contains the predicted quantiles and their standard errors for values of the covariate corresponding to temp=130 and temp=150. This is done with the control variable, which is set to 1 for only two observations.

Using the standard error estimates obtained from the output data set, approximate 90% confidence limits for the predicted quantities are then created in a subsequent DATA step for the log response. The logs of the predicted values are obtained because the values of the P= variable in the OUT= data set are in the same units as the original response variable, time. The standard errors of the quantiles of the log(time) are approximated (using a Taylor series approximation) by the standard deviation of time divided by the mean value of time. These confidence limits are then converted back to the original scale by the exponential function. The following statements produce Output 36.1.1 through Output 36.1.5:

   title 'Motorette Failures With Operating Temperature as a Covariate';
   data motors;
      input time censor temp @@;
      if _N_=1 then
         do;
            temp=130;
            time=.;
            control=1;
            z=1000/(273.2+temp);
            output;
            temp=150;
            time=.;
            control=1;
            z=1000/(273.2+TEMP);
            output;
         end;
      if temp>150;
      control=0;
      z=1000/(273.2+temp);
      output;
      datalines;
   8064 0 150 8064 0 150 8064 0 150 8064 0 150 8064 0 150
   8064 0 150 8064 0 150 8064 0 150 8064 0 150 8064 0 150
   1764 1 170 2772 1 170 3444 1 170 3542 1 170 3780 1 170
   4860 1 170 5196 1 170 5448 0 170 5448 0 170 5448 0 170
    408 1 190  408 1 190 1344 1 190 1344 1 190 1440 1 190
   1680 0 190 1680 0 190 1680 0 190 1680 0 190 1680 0 190
    408 1 220  408 1 220  504 1 220  504 1 220  504 1 220
    528 0 220  528 0 220  528 0 220  528 0 220  528 0 220
   ;

   proc print data=motors;
   run;

   proc lifereg data=motors outest=models covout;
      a: model time*censor(0)=z;
      b: model time*censor(0)=z / dist=lnormal;
            output out=out quantiles=.1 .5 .9 std=std p=predtime
            control=control;
   run;

   proc print data=models;
      id _model_;
      title 'fitted models';
   run;

   data out1;
      set out;
      ltime=log(predtime);
      stde=std/predtime;
      upper=exp(ltime+1.64*stde);
      lower=exp(ltime-1.64*stde);
   proc print;
      id temp;
      title 'quantile estimates and confidence limits';
   run;

Output 36.1.1: Motorette Failure Data

Motorette Failures With Operating Temperature as a Covariate

Obs time censor temp control z
1 . 0 130 1 2.48016
2 . 0 150 1 2.36295
3 1764 1 170 0 2.25632
4 2772 1 170 0 2.25632
5 3444 1 170 0 2.25632
6 3542 1 170 0 2.25632
7 3780 1 170 0 2.25632
8 4860 1 170 0 2.25632
9 5196 1 170 0 2.25632
10 5448 0 170 0 2.25632
11 5448 0 170 0 2.25632
12 5448 0 170 0 2.25632
13 408 1 190 0 2.15889
14 408 1 190 0 2.15889
15 1344 1 190 0 2.15889
16 1344 1 190 0 2.15889
17 1440 1 190 0 2.15889
18 1680 0 190 0 2.15889
19 1680 0 190 0 2.15889
20 1680 0 190 0 2.15889
21 1680 0 190 0 2.15889
22 1680 0 190 0 2.15889
23 408 1 220 0 2.02758
24 408 1 220 0 2.02758
25 504 1 220 0 2.02758
26 504 1 220 0 2.02758
27 504 1 220 0 2.02758
28 528 0 220 0 2.02758
29 528 0 220 0 2.02758
30 528 0 220 0 2.02758
31 528 0 220 0 2.02758
32 528 0 220 0 2.02758

Output 36.1.2: Motorette Failure: Model A

The LIFEREG Procedure

Model Information
Data Set WORK.MOTORS
Dependent Variable Log(time)
Censoring Variable censor
Censoring Value(s) 0
Number of Observations 30
Noncensored Values 17
Right Censored Values 13
Left Censored Values 0
Interval Censored Values 0
Missing Values 2
Name of Distribution WEIBULL
Log Likelihood -22.95148315

Analysis of Parameter Estimates
Variable DF Estimate Standard Error Chi-Square Pr > ChiSq Label
Intercept 1 -11.89122 1.96551 36.6019 <.0001 Intercept
z 1 9.03834 0.90599 99.5239 <.0001  
Scale 1 0.36128 0.07950     Extreme value scale

Output 36.1.3: Motorette Failure: Model B

The LIFEREG Procedure

Model Information
Data Set WORK.MOTORS
Dependent Variable Log(time)
Censoring Variable censor
Censoring Value(s) 0
Number of Observations 30
Noncensored Values 17
Right Censored Values 13
Left Censored Values 0
Interval Censored Values 0
Missing Values 2
Name of Distribution LNORMAL
Log Likelihood -24.47381031

Analysis of Parameter Estimates
Variable DF Estimate Standard Error Chi-Square Pr > ChiSq Label
Intercept 1 -10.47056 2.77192 14.2685 0.0002 Intercept
z 1 8.32208 1.28412 42.0001 <.0001  
Scale 1 0.60403 0.11073     Normal scale

Output 36.1.4: Motorette Failure: Fitted Models

fitted models

_MODEL_ _NAME_ _TYPE_ _DIST_ _STATUS_ _LNLIKE_ Intercept time z _SCALE_ _SHAPE1_
A time PARMS WEIBULL 0 Converged -22.9515 -11.8912 -1.0000 9.03834 0.36128 .
A Intercept COV WEIBULL 0 Converged -22.9515 3.8632 -11.8912 -1.77878 0.03448 .
A z COV WEIBULL 0 Converged -22.9515 -1.7788 9.0383 0.82082 -0.01488 .
A Scale COV WEIBULL 0 Converged -22.9515 0.0345 0.3613 -0.01488 0.00632 .
B time PARMS LNORMAL 0 Converged -24.4738 -10.4706 -1.0000 8.32208 0.60403 .
B Intercept COV LNORMAL 0 Converged -24.4738 7.6835 -10.4706 -3.55566 0.03267 .
B z COV LNORMAL 0 Converged -24.4738 -3.5557 8.3221 1.64897 -0.01285 .
B Scale COV LNORMAL 0 Converged -24.4738 0.0327 0.6040 -0.01285 0.01226 .

Output 36.1.5: Motorette Failure: Quantile Estimates and Confidence Limits

quantile estimates and confidence limits

temp time censor control z _PROB_ PREDTIME STD ltime stde upper lower
130 . 0 1 2.48016 0.1 12033.19 5482.34 9.3954 0.45560 25402.68 5700.09
130 . 0 1 2.48016 0.5 26095.68 11359.45 10.1695 0.43530 53285.36 12779.95
130 . 0 1 2.48016 0.9 56592.19 26036.90 10.9436 0.46008 120349.65 26611.42
150 . 0 1 2.36295 0.1 4536.88 1443.07 8.4200 0.31808 7643.71 2692.83
150 . 0 1 2.36295 0.5 9838.86 2901.15 9.1941 0.29487 15957.38 6066.36
150 . 0 1 2.36295 0.9 21336.97 7172.34 9.9682 0.33615 37029.72 12294.62

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.