
Generate a Transmission Tree
make_tree.Rd
Creates 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
stochastic
isFALSE
, or the mean of the Poisson distribution whenstochastic
isTRUE
.- 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
.