理解與視覺化 Kaplan-Meier 曲線

R 的生存分析

Heidi Seibold

Statistician at LMU Munich

ggsurvplot 函式

library(survminer)

ggsurvplot(fit)
ggsurvplot(
  fit, palette = NULL, linetype = 1, 
  surv.median.line = "none", risk.table = FALSE,
  cumevents = FALSE, cumcensor = FALSE, 
  tables.height = 0.25,
  ...
)
R 的生存分析

ggsurvplot 函式

ggsurvplot(
  fit = km, 
  palette = "blue", 
  linetype = 1, 
  surv.median.line = "hv", 
  risk.table = TRUE,
  cumevents = TRUE, 
  cumcensor = TRUE,
  tables.height = 0.1
)

R 的生存分析

survfit 函式

survfit(object)
  • objectformula:Kaplan-Meier 估計
  • 其他 object 選項(見後續章節):
    • coxph
    • survreg
R 的生存分析

一起來練習吧!

R 的生存分析

Preparing Video For Download...