survfit_fast | R Documentation |
Simple, fast function to generate basic lifetables. No error checking is performed.
survfit_fast(time, events)
time |
Vector of event/censoring times |
events |
Vector of indicators for whether each time is an event (1) or a censoring (0). Must be same length vector as time argument. |
Returns a list format lifetable with the following entries:
"n"Number of patients
"time"Vector of times
"n.risk"Vector of numbers of patients at risk at each time
"n.event"Vector of numbers of patients with an event at each time
"n.censor"Vector of numbers of patients censored at each time
"surv"Vector of estimates of Survival function at each time
"se"Vector of standard errors of estimates of Survival function at each time
James Bell
survfit_fast(c(1,2,3,3,4,5),c(1,0,1,1,0,1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.