build_tree: Simulate a single epidemic path

Description Usage Arguments Value

View source: R/sim-functions.R

Description

For information about input parameters, see the documentation for add_layer. The function starts by generating nstart initial parents with their communicable periods of random duration, all starting at t_infect = 0. The function then builds a tree from these initial nodes by iteratively calling add_layer. The iteration stops when it receives an empty tibble, which happens either when the epidemic extinguishes, or all branches have extended beyond t_max.

Usage

1
build_tree(nstart, tmax, tbar, p, lambda, kappa, q, mbar, kappaq, ceil)

Arguments

...

Input parameters for add_layer.

Value

A list of tibbles, each one containing information about new nodes generated from the previous ones. This list is a tree.


pspc-data-science/branchsim documentation built on Jan. 19, 2021, 10:10 a.m.