菜单

lifereg

data ww.test16_1; /*创建数据集*/
input id age smoke month;
index=(month<0);
month=abs(month);
cards;
1 45 0 29.4 239
2 50 0 33.2 150
3 47 1 23.7 360
4 34 1 21.5 -400
5 56 0 28 375
6 65 1 25.3 280
7 48 0 22.5 -100
8 56 0 23.4 277
9 66 1 27.9 126
10 75 0 20.4 -10
11 67 1 24.3 170
12 46 1 19.8 500
13 65 0 20.4 300
14 45 1 22.2 360
15 85 0 34 36
;
run;
proc lifereg data=ww.test16_1; /*执行生存分析*/
MODEL month*index(1)=age smoke ;
run;