*prog name: oc.coxsnell.sas; options nocenter linesize=80 errors=3; title1 ''; filename inf 'oc.dat'; data a; infile inf; input age grade stage disease p32 t event; if (grade^=9); g2=(grade=2); g3=(grade=3); run; proc lifereg data=a; class grade; model t*event(0)= grade /d=weibull; output out=b cres=e; run; *cres contains the name of the Cox-Snell residuals; proc lifetest data=b plots=(ls) notable graphics; time e*event(0); symbol1 v=none; run; quit;