Duplicate data frame for each treatment arm to emulate

clone_arms(data, arms)

Arguments

data

Input data frame that contains all observations of interest. Each row represents an observation, and columns include observation identifiers, binary treatment variable (0/1), time to treatement (continuous), binary outcome variable (0/1), observed followup time (continuous), and covariates.

arms

Character vector that each element represents each arm's name.

Value

A list of data frame. Each element of list is associated with each arm.

Examples

data(lungcancer)
clones <- clone_arms(lungcancer, c("Control", "Surgery"))