View source: R/kaplanMeier_at_t0.r
kaplanMeier_at_t0 | R Documentation |
Compute value of Kaplan-Meier estimate at a given time t_0
.
kaplanMeier_at_t0(time, event, t0)
time |
Event times, censored or observed. |
event |
Censoring indicator, 1 for event, 0 for censored. |
t0 |
Vector (or single number) of time points to compute confidence interval for. |
Matrix with values of Kaplan-Meier estimate at t_0
.
Kaspar Rufibach (maintainer)
kaspar.rufibach@roche.com
# use Acute Myelogenous Leukemia survival data contained in package 'survival'
time <- leukemia[, 1]
status <- leukemia[, 2]
tmp <- Surv(time, status) ~ 1
plot(survfit(tmp, conf.type = "none"), mark = "/", col = 1:2)
kaplanMeier_at_t0(time, status, t0 = c(10, 25, 50))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.