【发布时间】:2020-09-17 18:54:03
【问题描述】:
我在生存分析中遇到了障碍;我认为这与审查类型有关。这是我的生存数据的前 30 行。 tstart 是患者入院并开始接受干预的时间,tstop 是死亡(状态 = 1)或出院(已审查,状态 = 0):
tstart tstop status Intervention
1 2 14 0 FALSE
2 2 5 0 FALSE
3 2 10 1 FALSE
4 5 8 0 FALSE
5 6 10 0 FALSE
6 6 10 0 FALSE
7 7 10 0 FALSE
8 8 20 1 TRUE
9 8 25 0 FALSE
10 8 18 0 FALSE
11 8 11 0 FALSE
12 8 9 0 FALSE
13 9 11 0 FALSE
14 9 52 0 TRUE
15 9 26 1 FALSE
16 10 20 1 TRUE
17 10 14 0 FALSE
18 10 14 0 FALSE
19 10 11 0 FALSE
20 10 23 0 TRUE
21 10 26 0 TRUE
22 10 16 0 FALSE
23 11 21 0 TRUE
24 11 96 0 TRUE
25 11 14 0 FALSE
26 11 16 0 TRUE
27 11 14 0 FALSE
28 11 16 0 FALSE
29 11 16 0 FALSE
30 11 38 1 TRUE
根据我如何将这些数据输入 coxph 函数,我得到两个不同的结果。即:
# METHOD ONE:
> coxph (Surv (time = (tstop - tstart), event = status) ~ Intervention, data = df.use)
Call:
coxph(formula = Surv(time = (tstop - tstart), event = status) ~
Intervention, data = df.use)
coef exp(coef) se(coef) z p
InterventionTRUE -0.05975 0.94200 0.04727 -1.264 0.206
Likelihood ratio test=1.58 on 1 df, p=0.2084
n= 7362, number of events= 2364
# METHOD TWO:
> coxph (Surv (time = tstart, time2 = tstop, event = status) ~ Intervention, data = df.use)
Call:
coxph(formula = Surv(time = tstart, time2 = tstop, event = status) ~
Intervention, data = df.use)
coef exp(coef) se(coef) z p
InterventionTRUE -0.29936 0.74129 0.04902 -6.106 0.00000000102
Likelihood ratio test=35.67 on 1 df, p=0.000000002337
n= 7362, number of events= 2364
我认为这两种方法会返回相同的风险比,但结果却截然不同。为什么是这样?如何避免?
【问题讨论】:
-
这更像是一个统计问题而不是编程问题。简短的回答是这两种方法是两种不同的东西。您应该只将 time2 用于间隔删失数据。您的研究设计意味着右删失数据,因此方法 1 是正确的 - 这是您应该使用的。
-
谢谢,明白了。当我试图最终进行时间依赖性生存分析时(其中一个时间段患者没有接受干预,而第二个时间段患者正在接受干预),我认为我必须使用第二种格式( w/时间和时间2)。我现在要问一个新的问题。感谢您的帮助。
-
我在stackoverflow.com/questions/63946293/… 提出了我的新问题,如果您能阅读,我将不胜感激。谢谢。
标签: r survival-analysis survival