第 19 章 生存分析

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. Harrell20

R 软件内置了 survival 它是实现生存分析的核心 R 包。文档见 https://cran.r-project.org/package=survival 相关书籍见 Terry M. Therneau and Patricia M. Grambsch (2000)

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

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

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

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

参考文献

Terry M. Therneau, and Patricia M. Grambsch. 2000. Modeling Survival Data: Extending the Cox Model. New York: Springer.