Calculate the survivor function S(t) from a piecewise exponential model.

pwe_S(time, cut.pts, haz.rates)

Arguments

time

Time-point at which survivor fct is evaluated, S(time) = exp(-H(time)).

cut.pts

Vector of cut points.

haz.rates

Vector of hazard rates (must have one element more than the cut.pts vector).

Value

numeric estimate of survivor function at time t, S(t)