ODS RTF FILE = 'C:\Documents and Settings\richc\My Documents\CPH931F08\WA4931F08SAS.rtf'; PROC IMPORT DATAFILE = 'C:\Documents and Settings\richc\My Documents\CPH931F08\Burn.xls' OUT = burn DBMS = EXCEL REPLACE; SHEET = burn; GETNAMES = YES; RUN; proc lifereg data=burn; model T3*D3(0)=z1 z10 / 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=green i=spline; symbol2 h=1 v=circle c=yellow i=spline; symbol3 h=1 v=circle c=red i=spline; symbol4 h=1 v=circle c=blue i=spline; proc sort data=new; by prob; data new; set new; group = z1 + 2*z10; run; proc format; value groupnew 0 = "Routine, no resp tract" 1 = "Cleansing, no resp tract" 2 = "Routine, resp tract" 3 = "Cleansing, resp tract"; run; proc gplot data=new; format group groupnew.; plot prob*T3=group/ frame cframe=ligr legend=legend1 vaxis=axis1 haxis=axis2; title 'Weibull Model'; run; data Inrisks; input Z1 Z10; datalines; 0 0 0 1 1 0 1 1 ; proc phreg data=burn ; model T3*D3(0)=Z1 Z10; baseline covariates=Inrisks out=Pred1 survival=S / nomean; run; data Pred1; set Pred1; pattern = z1+2*z10; run; legend1 label=none shape=symbol(3, .8) value=(f=swiss h=.8 'routine, no resp tract' 'cleansing, no resp tract' 'routine, resp tract' 'cleansing, resp tract'); 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*T3=Pattern / legend=legend1 vaxis=axis1 haxis=axis2 cframe=ligr; symbol1 interpol=stepLJ h=1 v=circle c=green; symbol2 interpol=stepLJ h=1 v=circle c=yellow; symbol3 interpol=stepLJ h=1 v=circle c=red; symbol4 interpol=stepLJ h=1 v=circle c=blue; title 'Proportional Hazards Model'; run; PROC PHREG DATA = burn; MODEL T3*D3(0) = Z1 Z10 EXCISION / RISKLIMITS; IF (T1 < T3) THEN EXCISION = 1; ELSE EXCISION = 0; RUN; ODS RTF CLOSE; RUN;