Transform Cumulative Hazard to Survival
Helper function to transform between CHF and survival function
cumulative_hazard_to_survival(hazard_functions)
hazard_functions
: matrix or vector, with each row representing a cumulative hazard functionA matrix or vector transformed to the form of a survival function.
library(survex) vec <- c(1, 2, 3, 4, 5) matr <- matrix(c(1, 2, 3, 2, 4, 6), ncol = 3) cumulative_hazard_to_survival(vec) cumulative_hazard_to_survival(matr)