survival: Add SM survival plot

Plot survival after SM diagnosis.
This commit is contained in:
Jens Sauer 2021-01-17 15:27:15 +01:00
parent 465ce64487
commit 388e20673c

View File

@ -73,6 +73,16 @@ sma_plot_surv_asct_dx <- function() {
ggtheme = theme_bw()) ggtheme = theme_bw())
} }
# plot survival after SM diagnosis
sma_plot_surv_sm <- function() {
ggsurvplot(survfit(Surv(event_time_sm, event_status) ~ 1, secmal),
data = secmal, xscale = "d_y",
break.time.by = 365.25,
legend = "none",
xlab = "Years",
ggtheme = theme_bw())
}
# #
# Write survival plots to files # Write survival plots to files
# #
@ -83,4 +93,5 @@ sma_plot_file_surv <- function() {
sma_plot_file("survival_asct_sex.png", png, sma_plot_surv_asct_sex) sma_plot_file("survival_asct_sex.png", png, sma_plot_surv_asct_sex)
sma_plot_file("survival_dx_dx.png", png, sma_plot_surv_dx_dx) sma_plot_file("survival_dx_dx.png", png, sma_plot_surv_dx_dx)
sma_plot_file("survival_asct_dx.png", png, sma_plot_surv_asct_dx) sma_plot_file("survival_asct_dx.png", png, sma_plot_surv_asct_dx)
sma_plot_file("survival_sm.png", png, sma_plot_surv_sm)
} }