Description Usage Arguments Value
View source: R/sim-functions.R
Given a set of parent nodes and their properties, this function simulates the next generation of infected nodes.
1 |
parent_layer |
A |
tmax |
A non-negative scalar. Cutoff time for the simulated branches. |
tbar |
A non-negative scalar. Average duration of the
communicable windows of the new nodes. Together with
|
p |
A scalar greater than 0 and smaller than 1. Parameter for the logarithmic distribution that governs the number of new infections per infectious event. |
lambda |
A non-negative scalar. Rate parameter for the Poisson distribution that governs the number of infectious events per parent node. |
kappa |
A non-negative scalar (including |
q |
A scalar between 0 and 1. The probability that a parent
node has a communicable period of the second kind (a Gamma
distribution with mean |
mbar |
A non-negative scalar. The mean duration of
communicable windows of the second kind. This parameter has no
role if |
kappaq |
A non-negative scalar. The shape parameter for
communicable windows of the second kind. This parameter has no
role if |
A data.frame
with one row for each new node, and
four columns: id
(the node's unique ID),
id_parent
(the parent ID), t_infect
(the time at
which the node became infectious), and t_comm
(the
duration of the communicable window).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.