secmal/cmprsk: Change scaling to years
This commit is contained in:
parent
f29a5f1ef5
commit
c353208702
5
secmal.R
5
secmal.R
@ -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.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user