make_sf {HQM} | R Documentation |
Survival function from a hazard
Description
Creates a survival function from a hazard rate which was calculated on a grid.
Usage
make_sf(step_size_s_grid, haz)
Arguments
step_size_s_grid |
Numeric value indicating the distance between two grid continuous grid points. |
haz |
Vector of hazard values. Hazard rate must have been calculated on a time grid. |
Details
The function make_sf
calculates the survival function
S(t) = \exp (-\int_0^t h(t) dt),
where h
is the hazard rate. Here, a discritisation via an equidistant grid \{ t_i \}
on [0,t]
is used to calculate the integral and it is assumed that h
has been calculated for exactly these time points t_i
.
Value
A vector of values S(t_i)
.
Examples
make_sf(0.1, rep(0.1,10))
[Package HQM version 0.1.0 Index]