survfit_makeup {maicplus} | R Documentation |
Helper function to select set of variables used for Kaplan-Meier plot
Description
Helper function to select set of variables used for Kaplan-Meier plot
Usage
survfit_makeup(km_fit, single_trt_name = "treatment")
Arguments
km_fit |
returned object from |
single_trt_name |
name of treatment if no strata are specified in |
Value
a list of data frames of variables from survival::survfit()
. Data frame is divided by treatment.
Examples
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)
[Package maicplus version 0.1.2 Index]