data ww.test16_2; /*创建数据集*/
input group day;
index=(day<0);
day=abs(day);
cards;
1 133
1 108
1 -34
1 57
1 87
1 99
1 109
1 178
1 123
1 76
2 45
2 67
2 99
2 102
2 -199
2 201
2 -95
2 73
2 139
2 120
;
run;
proc lifetest data=ww.test16_2 method=act; /*生存分析*/
time day*index(1); /*指定分析的变量*/
strata group;
run;