lifetable | R Documentation |
Specify vector of time endpoints and create a cohort life table for two or more strata
lifetable(
obj,
ntimes = 3,
times = NULL,
nround = 3,
show.strata = TRUE,
strata.name = "strata",
summary = FALSE
)
obj |
An object of class |
ntimes |
number of time intervals |
times |
A vector of endpoints of time intervals to show life table
calculations. By default, these are |
nround |
number of digits to round table values |
show.strata |
logical; if |
strata.name |
column name for the different strata |
summary |
logical; if |
Essentially a wrapper around KMsurv::lifetab()
that allows the
user to input a survfit
object instead of vectors of raw values.
A table with the following columns:
strata |
name of specific group in variable |
times |
time interval |
nsubs |
See |
nlost |
See |
nrisk |
See |
nevent |
See |
surv |
See |
pdf |
See |
hazard |
See |
se.surv |
See |
se.pdf |
See |
se.hazard |
See |
Derek Chiu
KMsurv::lifetab()
library(survival)
obj <- survfit(Surv(futime, fustat) ~ rx, data = ovarian)
lifetable(obj)
lifetable(obj, ntimes = 4, show.strata = FALSE)
lifetable(obj, ntimes = 4, times = c(200, 500, 800, 1000))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.