R/intsurv.R
int_surv.Rd
Integral approximation of a time dependent function. Computes an approximation of \(\int_start^stop S(t) dt\), where \(S(t)\) is a survival function, for a selection of start and stop time points.
int_surv(times, surv, start = 0, stop = max(times), extend = FALSE)
Numeric vector, sorted time points.
Numeric vector, values of a survival function evaluated at time
points given by times
.
Numeric vector, start of the integral.
Numeric vector, end of the integral.
(logical) If TRUE, integral is extended beyond the last observed time point
Numeric vector, value of the integral.