options pagesize=47 linesize=80; filename grafout 'l10.ps'; goptions device=pslmono gsfname=grafout gsfmode=append; data emerson ; infile 'emerson.dat' ; input age ttt crind crtime transs transp time status fab gender wbc kscore chem; idno=_n_; ksh=0; if kscore>55 then ksh=1; if kscore>85 then ksh=2; run; proc lifetest plot=(s) data=emerson;time crtime*crind(0);run; title1 'Accelerated life fit with generalized Gamma errors'; title2 'Response is remission time'; /***********************************************************/ /* We get the same results if we replace the d=gamma */ /* noshape1 by Weibull, since Weibull is special case of */ /* generalized gamma with shape1=1, and shape1=1 is default*/ /* so we need not specify it. We get the same results */ /* omitting d=gamma noshape1, since Weibull is default.*/ /* The first model fit gives a negative value for the gen. */ /* gamma shape parameter, forcing a flat spot at the */ /* beginning of the survival curve. I believe that conver-*/ /* gence warning is spureous. */ /***********************************************************/ %include 'l09m.sas'; proc lifereg data=emerson; model crtime*crind(0)=ttt kscore/d=gamma; output out=residds cdf=cdf; run; data residds; set residds; csresid=-log(1-cdf); run; %coxsnell(crind); title3 'Using kscore as a categorical variable'; proc lifereg data=emerson; class ksh; model crtime*crind(0)=ttt ksh/d=gamma; output out=residds cdf=cdf; run; data residds; set residds; csresid=-log(1-cdf); run; title1 'Accelerated life fit with Weibull errors'; proc lifereg data=emerson; model crtime*crind(0)=ttt kscore/d=gamma noshape1; output out=residds cdf=cdf; run; data residds; set residds; csresid=-log(1-cdf); run; %coxsnell(crind); proc lifereg data=emerson; model crtime*crind(0)=ttt kscore/d=weibull ; run; title1 'Accelerated life fit with log normal errors'; proc lifereg data=emerson; model crtime*crind(0)=ttt kscore/d=gamma shape1=0 noshape1; output out=residds cdf=cdf; run; data residds; set residds; csresid=-log(1-cdf); run; %coxsnell(crind); title1 'Accelerated life fit with generalized Gamma errors'; title2 'Response is Survival time'; proc lifereg data=emerson; model time*status(0)=ttt kscore/d=gamma; run; title1 'Accelerated life fit with Weibull errors'; proc lifereg data=emerson; model time*status(0)=ttt kscore/d=gamma noshape1; run; title1 'Accelerated life fit with log normal errors'; proc lifereg data=emerson; model time*status(0)=ttt kscore/d=gamma shape1=0 noshape1; run; title1 'Accelerated life fit with exponential errors'; /***********************************************************/ /* We could get the same results as below by replacing */ /* d=exponential by d=weibull noscale, or by */ /* d=gamma noscale noshape1 */ /***********************************************************/ proc lifereg data=emerson; model time*status(0)=ttt kscore/covb d=exponential ; output out=out std=std xbeta=xbeta p=p; run; proc print data=out; run;