Sample trees with same features as original but permuted through the trees

sample_mc_trees(
  observed_data,
  B = 100,
  covariate_names = "x",
  multiple_outside_transmissions = FALSE,
  replace_vars = FALSE
)

Arguments

observed_data

data frame with the following columns

cluster_id

unique cluster ID

covariates

covariates of the individuals

B

number of trees to sample

covariate_names

string names of covariates

multiple_outside_transmissions

logical indicating whether we allow multiple outside transmissions or not. Default is FALSE

replace_vars

logical indicating whether we can re sample from the covariate df. Default is FALSE

Value

data frame with the following columns