View source: R/survival-helper.R
survfit_makeup | R Documentation |
Helper function to select set of variables used for Kaplan-Meier plot
survfit_makeup(km_fit, single_trt_name = "treatment")
km_fit |
returned object from |
single_trt_name |
name of treatment if no strata are specified in |
a list of data frames of variables from survival::survfit()
. Data frame is divided by treatment.
library(survival)
data(adtte_sat)
data(pseudo_ipd_sat)
combined_data <- rbind(adtte_sat[, c("TIME", "EVENT", "ARM")], pseudo_ipd_sat)
kmobj <- survfit(Surv(TIME, EVENT) ~ ARM, combined_data, conf.type = "log-log")
survfit_makeup(kmobj)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.