options ls=74; %let path=Z:\mosswhou\projects\cancer center\myron\survivalfit\method; %let sheet=Sheet1; PROC IMPORT OUT= a DATAFILE= "&path\9700_8700_Database for Dr Chang stat.xls" DBMS=EXCEL REPLACE; SHEET="&sheet"; GETNAMES=yes; MIXED=NO; SCANTEXT=YES; USEDATE=YES; SCANTIME=YES; RUN; /* DF_LF PFS__M_ DFLFX PFSX*/ proc freq; tables df_lf * dflfx; run; data b;set a; if dflfx=0 then ggg=0; if dflfx>0 then ggg=1; run; proc print; where ggg=1 and status_0_alive_1_dead=0; run; proc freq;tables ggg*status_0_alive_1_dead; run; data c;set b; time=OS__M_; run; proc lifetest data=c plots=(s); time OS__M_*status_0_alive_1_dead(0); strata ggg; run;