第 30 章 生存分析

The fact that some people murder doesn’t mean we should copy them. And murdering data, though not as serious, should also be avoided.

— Frank E. Harrell 74

R 软件内置了 survival 它是实现生存分析的核心 R 包。文档见 https://cran.r-project.org/package=survival 相关书籍见 [83]

survminer 竟然严重依赖 ggpubr,ggpubr 包曾被 ggtree 的作者余光创严重吐槽过ggfortify 大大扩展了 ggplot2 包的 autoplot() 函数,使得它适应各种模型对象的自动绘图。

30.1 急性粒细胞白血病生存数据

library(survival)
leukemia.surv <- survfit(Surv(time, status) ~ x, data = aml)
library(ggfortify)
autoplot(leukemia.surv, data = aml) +
  theme_minimal()
急性粒细胞白血病生存数据

图 30.1: 急性粒细胞白血病生存数据

参考文献

[83]
Terry M. Therneau and Patricia M. Grambsch, Modeling survival data: Extending the Cox model. New York: Springer, 2000.