secmal/cmprsk: Change scaling to years

This commit is contained in:
Jens Sauer 2021-01-17 19:02:33 +01:00
parent f29a5f1ef5
commit c353208702

View File

@ -77,9 +77,10 @@ sma_plot_secmal_haz_dx <- function() {
# plot competing risk of SM
sma_plot_secmal_cmprsk <- function() {
cpr <- cuminc(secmal$time_at_risk, secmal$time_at_risk_status)
cpr <- cuminc(secmal$time_at_risk / 365.25, secmal$time_at_risk_status)
ggcompetingrisks(cpr[1], conf.int = TRUE, multiple_panels = FALSE,
legend = "none", title = "", ylim = c(0:1))
legend = "none", title = "", ylim = c(0:1),
xlab = "Year")
}
# Calculate cumuative risk with ci from cuminc.