.epichains {epichains} | R Documentation |
Create an <epichains>
object
Description
epichains()
constructs an <epichains>
object, which is
inherently an <data.frame>
object that stores some of the inputs
passed to the simulate_chains()
and the
simulated output. The stored attributes are useful for downstream
analyses and reproducibility. This function checks the validity of the
object created to ensure it has the right columns and column types.
An <epichains>
object contains a <data.frame>
of the simulated
outbreak with ids for each infector and infectee, generation, and
optionally, time, the number of chains simulated,
the chain statistic that was tracked, and whether the susceptible
population was tracked.
Usage
.epichains(
sim_df,
n_chains,
offspring_dist,
track_pop,
statistic = c("size", "length"),
stat_threshold = Inf
)
Arguments
sim_df |
a |
n_chains |
Number of chains to simulate. |
offspring_dist |
Offspring distribution: a |
track_pop |
Was the susceptible population tracked? Logical. |
statistic |
The chain statistic to track as the
stopping criteria for each chain being simulated when
|
stat_threshold |
A stopping criterion for individual chain simulations;
a positive number coercible to integer. When any chain's cumulative statistic
reaches or surpasses |
Value
An <epichains>
object.
Author(s)
James M. Azam