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0 2 26.5 0 2 28.5 0 2 RUN; proc lifereg data=kidney; class placement; model time*infection(0)=placement / distribution = weibull; output out=new cdf=prob; run; legend1 frame cframe=ligr cborder=black position=center value=(justify=center); axis1 label=(angle=90 rotate=0 'Estimated CDF') minor=none; axis2 minor=none; symbol1 h=1 v=circle c=red i=spline; symbol2 h=1 v=circle c=blue i=spline; proc sort data=new; by prob; proc format; value placementnew 1 = "Surgical placement" 2 = "Percutaneous placement"; run; proc gplot data=new; format placement placementnew.; plot prob*time=placement/ frame cframe=ligr legend=legend1 vaxis=axis1 haxis=axis2; title 'Weibull Model'; run; proc lifereg data=kidney; class placement; model time*infection(0)=placement / distribution = llogistic; output out=new cdf=prob; run; legend1 frame cframe=ligr cborder=black position=center value=(justify=center); axis1 label=(angle=90 rotate=0 'Estimated CDF') minor=none; axis2 minor=none; symbol1 h=1 v=circle c=red i=spline; symbol2 h=1 v=circle c=blue i=spline; proc sort data=new; by prob; proc format; value placementnew 1 = "Surgical placement" 2 = "Percutaneous placement"; run; proc gplot data=new; format placement placementnew.; plot prob*time=placement/ frame cframe=ligr legend=legend1 vaxis=axis1 haxis=axis2; title 'Log Logistic Model'; run; DATA kidney; SET kidney; Z1 = 0; IF PLACEMENT = 1 THEN Z1 = 1; RUN; data Inrisks; input Z1; datalines; 1 0 ; proc phreg data=kidney ; model time*infection(0)=Z1; baseline covariates=Inrisks out=Pred1 survival=S / nomean; run; data Pred1; set Pred1; if Z1 = 1 then Pattern = 1; else Pattern = 2; legend1 label=none shape=symbol(3, .8) value=(f=swiss h=.8 'Surgical placement' 'Percutaneous placement' ); axis1 label=(h=1 f=swiss a=90) minor=(n=1); axis2 label=(h=1 f=swiss) minor=(n=4); data Pred1; set Pred1; EstimatedCDF = 1 - S; run; proc gplot data=Pred1; plot EstimatedCDF*Time=Pattern / legend=legend1 vaxis=axis1 haxis=axis2 cframe=ligr; symbol1 interpol=stepLJ h=1 v=circle c=red; symbol2 interpol=stepLJ h=1 v=circle c=blue; title 'Proportional Hazards Model'; run; PROC PHREG DATA = kidney; MODEL TIME*INFECTION(0) = Z1 NPHZ1 / RISKLIMITS; NPHZ1 = Z1*log(TIME); RUN; ODS RTF CLOSE; RUN;