Convert Survival Curve to Instantaneous Hazard Rates
Source:R/adjust_survival_curve.R
convert_survival_to_hazard.Rd
This function converts a numeric vector of survival probabilities into instantaneous hazard rates. The relationship between survival probabilities and the discrete hazard rates is given by:
Details
$$h(t_i) = -\log\left(\frac{S(t_i)}{S(t_{i-1})}\right)$$
where \(S(t_i)\) is the survival probability at time \(t_i\) and \(h(t_i)\) is the hazard rate at time \(t_i\).
Examples
if (FALSE) { # \dontrun{
survival_curve <- c(0.99, 0.95, 0.90, 0.85)
v_hazard_rates <- NeuroblastomaPSM::convert_survival_to_hazard(
survival_curve = survival_curve
)
v_hazard_rates
} # }