options ls = 78; libname fu '../../sdata'; data fu.gastric; infile '../../data//gastric.dat' firstobs = 2; input pid 1-3 os 8-12 censor 15 treat 20; /* generating Figures 11.5 and 11.6 */ proc lifetest plot=(s, lls); time os * censor(0); strata treat; proc phreg; model os*censor(0) = x1 x2 x3 x4/risklimits; if 0< os <= 360 then x1 = treat; else x1 = 0; if 360 < os <= 720 then x2 = treat; else x2 = 0; if 720 < os <= 1080 then x3 = treat; else x3 = 0; if os > 1080 then x4 = treat; else x4 = 0; run;