![]() Chapter Contents |
![]() Previous |
![]() Next |
The LIFEREG Procedure |
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 SetWARNING: 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
|
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
|
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
|
![]() Chapter Contents |
![]() Previous |
![]() Next |
![]() Top |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.