Sample binary covariate transmission trees

sample_mc_binary_cov(
  B,
  observed_cluster_summaries,
  multiple_outside_transmissions = FALSE
)

Arguments

B

number of MC samples

observed_cluster_summaries

data frame with the following columns

freq

frequency of the following cluster

cluster_size

size of the cluster

x_pos

number of positive x (or 1)

x_neg

number of negative x (or 0)

multiple_outside_transmissions

logical indicating whether to sample from the multiple outside transmissions model. Default is FALSE.

Value

a data frame of sampled transmission trees with the following columns (the last one is only needed for the multiple outsider model)

freq

frequency of cluster with the following characteristics

cluster_size

size of the cluster

x_pos

number of x positives in the cluster

x_neg

number of x negatives in the cluster

mc_freq

frequency of MC trees with the following

x_pos_trans

number of transmissions from a positive individual in the tree

x_neg_trans

number of transmissions from a negative individual in the tree

root_node_sign

whether root node is pos or neg

@export