Weibull 模型结果可视化

R 中的生存分析

Heidi Seibold

Statistician at LMU Munich

Weibull 模型可视化

可视化工具通常针对阶梯函数。

因此下面的代码无法运行:

wb <- survreg(Surv(time, cens) ~ 1)
ggsurvplot(wb)

R 中的生存分析

Weibull 模型可视化

wb <- survreg(Surv(time, cens) ~ 1)

生存曲线:

surv <- seq(.99, .01, by = -.01)
t <- predict(wb, type = "quantile", p = 1 - surv, newdata = data.frame(1))

surv_wb <- data.frame(time = t, surv = surv, upper = NA, lower = NA, std.err = NA)

绘图:

ggsurvplot_df(fit = surv_wb, surv.geom = geom_line)
R 中的生存分析

Weibull 模型可视化

R 中的生存分析

Passons à la pratique !

R 中的生存分析

Preparing Video For Download...