# Monte Carlo / bootstrapping to generate a Kaplan Meier curve

I have 4 survival datasets from 4 different trials examining 2 different drug classes independently.

I would like to model the likely survival curve resulting from a pooled selection of either drug class, preferably with an ability to dictate weights for each drug class type in the final model (e.g., 50% of patients come from drug class 1, 50% of patients come from drug class 2)

What would be the best way to do this in R?

I've looked at censboot, but that seems more inline with bootsrapping a specific statistic from the data.

My end goal is to use this modeled arm to predict cut-offs for a treatment effect of an add-on therapy.

Truly appreciate any input / examples.

• Could you elaborate on the end goal? I don't think you could use bootstrap to estimate the entire survival curve. How about using bootstrap to estimate the survival probability at specific time points. (example, each month or so). Aug 1, 2018 at 22:38
• I ended up using sample to create a new dataframe from existing individual patient dataframes and reconstructed a KM curve from that. The goal to construct a KM curve over a 36 month period, which I believe this straightforward approach achieved adequately. Thanks for the questions though! Aug 2, 2018 at 16:25
• The Kaplan-Meier estimator assumes homogeneity of distributions. It doesn't necessarily make sense to pool disimilars. Sep 20, 2021 at 11:30

n_control <- 10000

perc_ambri <- 0.10
perc_maci <- 0.40
perc_maci_control <- 0.25

ambri_sample = ambri_mono[sample(nrow(ambri_mono),
size = perc_ambri * n_control,
replace=TRUE,
prob=NULL),]

replace=TRUE,
prob=NULL),]

maci_sample = maci_mono[sample(nrow(maci_mono),
size = perc_maci * n_control,
replace=TRUE,
prob=NULL),]

maci_control_sample = maci_control_mono[sample(nrow(maci_control_mono),
size = perc_maci_control * n_control,
replace=TRUE,
prob=NULL),]

control_arm = bind_rows(list(ambri_sample, tada_sample, maci_sample, maci_control_sample))

control_arm\$arm <- NULL

# this last bit was done so given that I wanted a ~350pt dataset
#but wanted to reduce variability in the overall result for repeatability
control_arm = control_arm[sample(nrow(control_arm),
size = 696/2,
replace=TRUE,
prob=NULL),]