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)

Arguments

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

Value

Scalar, value of cumulative incidence

Examples

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"
)