data ww.test16_3; /*创建数据集*/
input group smoke day;
index=(day<0);
day=abs(day);
cards;
1 1 102
1 0 155
1 1 89
1 1 59
1 0 -300
1 1 152
1 1 182
1 0 210
1 1 -99
1 0 378
1 1 -163
1 1 32
1 0 269
1 1 104
1 1 132
2 1 276
2 0 406
2 0 296
2 1 34
2 1 78
2 0 164
2 1 -50
2 1 102
2 1 137
2 0 -274
2 1 95
2 1 90
2 1 86
2 0 120
2 1 47
;
run;
proc phreg data=ww.test16_3; /*生存分析*/
model day*index(1)=group smoke; /*指定分析的模型*/
run;