Learn R Programming

survex (version 1.2.0)

cumulative_hazard_to_survival: Transform Cumulative Hazard to Survival

Description

Helper function to transform between CHF and survival function

Usage

cumulative_hazard_to_survival(hazard_functions)

Value

A matrix or vector transformed to the form of a survival function.

Arguments

hazard_functions

matrix or vector, with each row representing a cumulative hazard function

Examples

Run this code
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)

Run the code above in your browser using DataLab