View source: R/prediction-helpers.R
cuminc_weib | R Documentation |
Based on Weibull hazards from both competing events. Integration is
done via stats::integrate
.
cuminc_weib(alph_ev, lam_ev, alph_comp, lam_comp, t)
alph_ev |
Numeric - shape of event of interest |
lam_ev |
Numeric - rate of event of interest |
alph_comp |
Numeric - shape of competing event |
lam_comp |
Numeric - rate of competing event |
t |
Scalar of vector of (positive) timepoints |
Scalar, value of cumulative incidence
time <- seq(0.1, 10, by = 0.1) # Use baseline parametrisation from sim study cuminc <- cuminc_weib( alph_ev = 0.58, lam_ev = 0.19, alph_comp = 0.53, lam_comp = 0.21, t = time ) plot( x = time, y = cuminc, type = "l", xlab = "Time", ylab = "Cumulative incidence" )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.