| surv_search | R Documentation |
Evaluates a step survival function at arbitrary times. The estimate is a decreasing piecewise-constant function with jumps at the event times, so the value at any time is the one of the previous event time.
surv_search(tvals, time, surv)
tvals |
vector of times at which the survival function is evaluated. |
time |
vector of ordered distinct event times. |
surv |
vector of survival estimates at each event time. |
The survival estimate at each of the tvals times.
time <- c(4, 7, 9, 15, 21, 67)
surv <- c(0.8, 0.7, 0.65, 0.55, 0.43, 0.22)
# survival at times 1, 10, 32 and 74
surv_search(c(1, 10, 32, 74), time, surv)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.