Data generation function from JRSS-B paper

data_gen(
  n,
  theta,
  randomization,
  p_trt,
  case = c("case1", "case2", "case3", "case4", "case5")
)

Arguments

n

total number of subjects to be generated

theta

true treatment effect

randomization

randomization method in c("SR","CABC","permuted_block","minimization","urn")

p_trt

proportion of treatment arm

case

simulation case in the paper

Value

A data frame with the following columns:

t

event time

delta

event indicator

I1

assignment to treatment group 1

I0

assignment to treatment group 0

model_z1, model_z2

covariates

car_strata1, ...

strata variables