全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
1706 1
2018-11-24
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判断语句为数值型变量则运行正常,请问是哪里错了,自己一直想不明白


二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2018-11-26 10:22:24
首先检查你group变量的值是不是都空了
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群