
Generate a Transmission Tree
make_tree.RdCreates a transmission tree with a specified number of cases and branches per case. The tree can be generated with fixed or Poisson-distributed branching factors.
Arguments
- n_cases
Integer. The total number of cases (nodes) in the tree.
- R
Integer. The fixed number of branches per case when
stochasticisFALSE, or the mean of the Poisson distribution whenstochasticisTRUE.- stochastic
Logical. If
TRUE, the number of branches per case is sampled from a Poisson distribution with meanR. Default isFALSE.- plot
Logical. If
TRUE, the function will plot the generated tree. Default isFALSE.

