简体   繁体   English

在计算生存函数相等性的对数秩检验时,R 的生存 package 如何处理发生在 t0 的死亡?

[英]How does the survival package for R handle deaths that occur at t0 when computing a log-rank test for equality of survival functions?

I read that in Stata, there is an issue where observations can end at t0 and therefore be omitted from the analysis inadvertently.我在 Stata 中读到,存在一个问题,即观察可以在 t0 结束,因此无意中从分析中省略了。 The workaround is to add some small e > 0 to each death at t0 to prevent this.解决方法是在 t0 时为每次死亡添加一些小的 e > 0 以防止这种情况发生。 See this link for the description of the issue in Stata.有关 Stata 中问题的描述,请参阅此链接。 https://www.stata.com/support/faqs/statistics/time-and-cox-model/ https://www.stata.com/support/faqs/statistics/time-and-cox-model/

https://www.statalist.org/forums/forum/general-stata-discussion/general/1609582-cox-regression-observations-end-on-or-before-enter https://www.statalist.org/forums/forum/general-stata-discussion/general/1609582-cox-regression-observations-end-on-or-before-enter

My question is how does R handle this using the survival package when running a long rank comparison?我的问题是 R 在运行长排名比较时如何使用生存 package 来处理这个问题? I cannot find any relevant documentation, but from running some tests it seems that R automatically adds a tiny bit of epsilon >0 to get around this.我找不到任何相关文档,但通过运行一些测试,似乎 R 会自动添加一点点 epsilon >0 来解决这个问题。 Can any one confirm or deny this, and if so provide a way to override the default behavior?任何人都可以确认或否认这一点,如果可以的话,提供一种方法来覆盖默认行为?

I tried running a parallel analysis in R and Stata, and I got different results.我尝试在 R 和 Stata 中运行并行分析,但得到了不同的结果。 Stat gave the message " Stat 给出了信息“

 45,024  total observations
          1  event time missing (GTIME>=.)                      PROBABLE ERROR
        341  observations end on or before enter()

"

While R did not give any such message.而R则没有给出任何这样的信息。 The end results of the computation of the Chi sq statistic were different and I think it was because of this discrepancy.卡方统计计算的最终结果不同,我认为这是因为这种差异。 Can anyone confirm?任何人都可以确认吗?

Never mind, found the solution.没关系,找到了解决方案。 R keeps the observations that perish at t = 0, whereas Stata omits them. R 保留在 t = 0 时消失的观察结果,而 Stata 则忽略它们。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM