get_km {easysurv} | R Documentation |
Generate Kaplan-Meier estimates
Description
Calculates Kaplan-Meier estimates for survival data and returns summary statistics, plots, and additional outputs.
Usage
get_km(
data,
time,
event,
group = NULL,
group_labels = NULL,
just_km = FALSE,
...
)
Arguments
data |
A data frame containing the survival data. |
time |
The name of the column in |
event |
The name of the column in |
group |
(Optional) The name of the column in |
group_labels |
Optional character vector containing the names of
the strata (default is NULL). Provide in a consistent order with
|
just_km |
Logical. If |
... |
(Optional) Parameters to pass to ggsurvfit. |
Value
A list containing Kaplan-Meier estimates, summary statistics, and plots.
Examples
km_results <- get_km(
data = easysurv::easy_bc,
time = "recyrs",
event = "censrec",
group = "group",
risktable_symbols = FALSE
)
km_results
[Package easysurv version 2.0.1 Index]