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

sample_gen_out_cond(observed_data, B)

Arguments

observed_data

data.table frame with the following columns

cluster_id

unique cluster ID

person_id

unique identifier for every person

covariates

covariates of the individuals

B

number of samples for each individual tree

Value

data frame with the following columns

cluster_id

unique cluster_id for the sampled cluster

orig_id

original ID of the given cluster

variable

columns from featureless tree sampling

person_id

original identifier

Details

assumes an observed outside infection