sas14周生存分析 LIFEREG过程LIFETEST过程 PHREG过程

书面作业 
董大均书p459 第3,4,5题

image

DATA test;
/*C 终检值 1:终检观测,0:死亡观测*/
INPUT time C @@;
CARDS;
1 0 3 0 5 0 6 0 7 0 8 0 10 0 14 1 17 0 19 1 20 1 22 1 26 1 31 1 34 0 34 1 44 0 59 0
;
PROC LIFETEST PLOTS = (S,H) METHOD = LT;
TIME time * C(1);
RUN;

image

分析:

1、  生存检验输出寿命表:

10月的生存率为:0.6667,标准误为:0.1111,估计剩余寿命中值最初为:33.3333,在第10月初达到峰值:33.7037个月,然后逐年减小。

2、  生存检验分析:

生存时间(月)样本总数:18个,死亡观测:11个,终检观察:7个,生存或失访的比例为:38.89%

3、  生存函数估计图:

image

4、  风险函数估计图:

image

 

 

image

 

data test;

input x1 x2 x3 x4 x5 x6 t y @@;

censor = (y = 1);

cards;

54 0 0 0 1 0 52 1 57 0 1 1 0 0 51 1 58 0 0 1 1 1 35 0

43 1 1 0 1 0 103 1 48 0 1 1 0 2 7 0 40 0 1 1 0 2 60 1

44 0 1 1 0 2 58 1 36 0 0 1 1 1 29 0 39 1 1 0 0 1 70 1

42 0 1 1 0 1 67 1 42 0 1 1 0 0 66 1 42 1 0 0 1 2 87 1

51 1 1 0 0 0 85 1 55 0 1 1 0 1 82 1 49 1 1 0 0 1 76 1

52 1 1 0 0 1 74 1 48 1 1 0 0 2 63 1 54 1 0 0 1 1 101 1

38 0 1 1 0 0 100 1 40 1 1 0 0 1 66 0 38 0 0 1 1 2 93 1

19 0 0 1 1 2 24 0 67 1 0 0 1 0 93 1 37 0 0 0 1 0 90 1

43 1 0 1 1 2 15 0 49 0 0 1 1 2 3 0 50 1 1 0 1 1 87 1

53 1 1 0 0 2 120 1 32 1 1 0 0 0 120 1 46 0 1 1 0 1 120 1

43 1 0 0 1 0 120 1 44 1 0 0 1 2 120 1 62 0 0 1 1 2 120 1

40 1 1 0 0 1 40 0 50 1 0 1 1 0 26 0 33 1 1 1 0 2 120 1

57 1 1 0 0 0 120 1 48 1 0 1 1 2 120 1 28 0 0 1 1 2 3 0

54 1 0 0 1 0 120 0 35 0 1 1 1 1 7 0 47 0 0 1 1 2 18 0

49 1 0 0 1 0 120 1 43 0 1 1 0 0 120 1 48 1 1 1 0 2 15 0

44 0 0 1 1 2 4 0 60 1 1 0 0 2 120 1 40 0 0 1 1 2 16 0

32 0 1 1 0 1 24 0 44 0 0 1 1 1 19 0 48 1 0 1 1 0 120 1

72 0 1 1 1 2 24 0 42 0 0 1 1 0 2 0 63 1 0 0 1 0 120 1

55 0 1 0 0 2 12 0 39 0 0 1 1 2 5 0 44 0 0 1 1 0 120 1

42 1 1 0 0 2 120 1 74 0 0 1 1 1 7 0 61 0 1 1 1 0 40 0

45 1 0 0 1 0 108 1 38 0 1 1 0 2 24 0 62 0 0 1 1 2 16 0

;

run;

proc lifereg;

model t * censor(1) = x1 x2 x3 x4 x5 x6;

run;

 

image

 

data test;

input month censor group @@;

cards;

2 1 0 13 0 0 7 1 0 11 1 0 6 0 0 1 0 0 11 0 0 3 0 0 17 0 0 7 0 0 10 0 1 2 1 1 12 1 1

13 0 1 18 0 1 6 1 1 19 1 1 26 0 1 9 1 1 8 1 1 6 1 1 43 1 1 9 0 1 4 0 1 31 0 1 24 0 1

;

proc phreg;

model month*censor(1)=group;

run;

您可以选择一种方式赞助本站