libname tabc 'C:\SAS';
data lifetest (compress=yes);
set "C:\SAS\tabc_data.sas7bdat"(encoding=any);
where location_county in (100 123 176 181);
if obligation_end_date=>'01JAN2014'd then total_receipts=total_receipts*0.86; else total_receipts=total_receipts*0.933;
if responsibility_End_Date = . then responsibility_End_Date='07NOV2018'd;
survivol_time= responsibility_end_date - responsibility_begin_date;
run;
proc sort data=work.lifetest;
by tabc_permit_number;
run;
data hehe;
set lifetest;
by tabc_permit_number;
if last.tabc_permit_number=1 then;
else delete;
if responsibility_End_Date='07NOV2018'd then censor=1;
else censor=0;
if location_city='beaumont' then group=1;
else if location_city='Port_Arthur' then group=2;
run;
proc lifetest data=work.hehe method=LT plots=(s);
time survivol_time*censor(1);
strata group;
run;
日志显示:WARNING: strata are empty.
如果红色的if判断语句为数值型变量则运行正常,请问是哪里错了,自己一直想不明白