options nocenter ls=140 mprint=on source notes; data cns; infile 'cns.txt'; input time death treatment KPS male age60 sexage; run; /******* First macro *****/ %include 'band.sas'; %SURVBAND(cns, time, death, treatment,KPS male age60 sexage, 0, 2, 0.05, 2000,785243, survout); /******* SAS/GRAPH has to be installed to plot the figures *****/ symbol1 i=steplj c=blue line=1 repeat=10; proc gplot; plot (surv1 surv2)*time/overlay; run; proc gplot; plot (diff1_2_low diff1_2 diff1_2_up)*time/overlay; run; proc phreg; model time*death(0)=KPS_t1 KPS_t2 male age60 sexage /rl; strata treatment; KPS_t1=0; KPS_t2=0; if time<1.5 then KPS_t1=KPS; if time>=1.5 then KPS_t2=KPS; run; /******* Second macro *****/ %include 'timeband.sas'; %TIMEBAND(cns, time, death, treatment, male age60 sexage, KPS, 1.5, 0, 2, 0.05, 2000,487012, survout); /******* SAS/GRAPH has to be installed to plot the figures *****/ symbol1 i=steplj c=blue line=1 repeat=10; proc gplot; plot (surv1 surv2)*time/overlay; run; proc gplot; plot (diff1_2_low diff1_2 diff1_2_up)*time/overlay; run; quit;