Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
The LIFEREG Procedure

Example 36.3: Overcoming Convergence Problems by Specifying Initial Values

This example illustrates the use of parameter initial value specification to help overcome convergence difficulties.

The following statements create a data set and request a Weibull regression model be fit to the data.

   data raw;                                                    
      input censor x c1 @@;                                        
      datalines;
   0 16 0.00   0 17 0.00   0 18 0.00                            
   0 17 0.04   0 18 0.04   0 18 0.04                            
   0 23 0.40   0 22 0.40   0 22 0.40                            
   0 33 4.00   0 34 4.00   0 35 4.00                            
   1 54 40.00  1 54 40.00  1 54 40.00                           
   1 54 400.00 1 54 400.00 1 54 400.00                          
   ;                                                            
   run;
                                                                
   proc print;
   run;

   title 'OLS (default) initial values';                        
   proc lifereg data=raw;                                       
      model x*censor(1) = c1 / distribution = weibull itprint;  
   run;

Output 36.3.1 shows the data set contents.

Output 36.3.1: Contents of the Data Set

Obs censor x c1
1 0 16 0.00
2 0 17 0.00
3 0 18 0.00
4 0 17 0.04
5 0 18 0.04
6 0 18 0.04
7 0 23 0.40
8 0 22 0.40
9 0 22 0.40
10 0 33 4.00
11 0 34 4.00
12 0 35 4.00
13 1 54 40.00
14 1 54 40.00
15 1 54 40.00
16 1 54 400.00
17 1 54 400.00
18 1 54 400.00


Convergence was not attained in 50 iterations for this model, as the messages to the log indicate:
   WARNING: Convergence not attained in 50 iterations.
   WARNING: The procedure is continuing but the validity of the model 
            fit is questionable.
The first line (iter=0) of the iteration history table, in Output 36.3.2, shows the default initial ordinary least squares (OLS) estimates of the parameters.

Output 36.3.2: Initial Least Squares

OLS (default) initial values

Iter Ridge Loglike Intercept c1 Scale
0 0 -22.891088 3.2324769714 0.0020664542 0.3995754195


The log logistic distribution is more robust to large values of the response than the Weibull, so one approach to improving the convergence performance is to fit a log logistic distribution, and if this converges, use the resulting parameter estimates as initial values in a subsequent fit of a model with the Weibull distribution.

The following statements fit a log logistic distribution to the data.

   proc lifereg data=raw;
      model x*censor(1) = c1 / distribution = llogistic;
   run;
The algorithm converges, and the maximum likelihood estimates for the log logistic distribution are shown in Output 36.3.3

Output 36.3.3: Estimates from the Log Logistic Distribution

The LIFEREG Procedure

Model Information
Data Set WORK.RAW
Dependent Variable Log(x)
Censoring Variable censor
Censoring Value(s) 1
Number of Observations 18
Noncensored Values 12
Right Censored Values 6
Left Censored Values 0
Interval Censored Values 0
Name of Distribution LLOGISTC
Log Likelihood 12.093136846

Analysis of Parameter Estimates
Variable DF Estimate Standard Error Chi-Square Pr > ChiSq Label
Intercept 1 2.89828 0.03179 8309.4488 <.0001 Intercept
c1 1 0.15921 0.01327 143.8537 <.0001  
Scale 1 0.04979 0.01218     Logistic scale


The following statements re-fit the Weibull model using the maximum likelihood estimates from the log logistic fit as initial values.

   proc lifereg data=raw outest=outest;
      model x*censor(1) = c1 / itprint distribution = weibull
                               intercept=2.898 initial=0.16 scale=0.05;
      output out=out xbeta=xbeta;
   run;

Examination of the resulting output in Output 36.3.4 shows that the convergence problem has been solved by specifying different initial values.

Output 36.3.4: Final Estimates from the Weibull Distribution

The LIFEREG Procedure

Model Information
Data Set WORK.RAW
Dependent Variable Log(x)
Censoring Variable censor
Censoring Value(s) 1
Number of Observations 18
Noncensored Values 12
Right Censored Values 6
Left Censored Values 0
Interval Censored Values 0
Name of Distribution WEIBULL
Log Likelihood 11.232023272

Algorithm converged.

Analysis of Parameter Estimates
Variable DF Estimate Standard Error Chi-Square Pr > ChiSq Label
Intercept 1 2.96986 0.03264 8278.8602 <.0001 Intercept
c1 1 0.14346 0.01652 75.4316 <.0001  
Scale 1 0.08437 0.01887     Extreme value scale

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

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