cumhazard | R Documentation |
Get Cumulative Hazard at a Landmark Timepoint
cumhazard( eventRates = tibble::tibble(duration = c(3, 100), rate = c(log(2)/5, log(2)/5 * 0.5)), landmark )
eventRates |
A tibble containing period duration ( |
landmark |
The landmark of interest to evaluate cumulative hazard. |
A numeric which is the cumulative hazard at a landmark timepoint.
# Piecewise exponential event rates of 0.5 for time 0-3, 0.4 for time 3-6, and 0.5 after cumhaz <- cumhazard(eventRates=tibble::tibble(duration = c(3,3,100),rate = c(0.5, 0.4, 0.3)), landmark=12)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.