Description Usage Arguments Value Author(s) References Examples
Simulate outbreaks of class phybreakdata
, with the outbreak model of phybreak (sim.phybreak
is deprecated).
1 2 3 4 5 6 7 8 9 | sim_phybreak(obsize = 50, popsize = NA, samplesperhost = 1,
R0 = 1.5, spatial = FALSE, gen.shape = 10, gen.mean = 1,
sample.shape = 10, sample.mean = 1, additionalsampledelay = 0,
wh.model = "linear", wh.bottleneck = "auto", wh.slope = 1,
wh.exponent = 1, wh.level = 0.1, dist.model = "power",
dist.exponent = 2, dist.scale = 1, mu = 1e-04,
sequence.length = 10000, ...)
sim.phybreak(...)
|
obsize |
The outbreak size (number of cases) to obtain. If |
popsize |
The population size in which to simulate. If it is not defined (default),
an optimal population size will be chosen based on R0 and obsize. Be aware that choosing a |
samplesperhost |
Number of samples to be taken per host, either a vector or a single number. |
R0 |
The basic reproduction ratio used for simulation. The offspring distribution is Poisson. |
spatial |
If |
gen.shape |
The shape parameter of the gamma-distributed generation interval. |
gen.mean |
The mean generation interval. |
sample.shape |
The shape parameter of the gamma-distributed sampling interval. |
sample.mean |
The mean sampling interval (for the first sample of each host). |
additionalsampledelay |
Sampling intervals since first sampling times of each host. Values in this vector will be used first for all additional samples of host 1, then of host 2, etc. |
wh.model |
The model for within-host pathogen dynamics (effective pathogen population size = N*gE = actual population size * pathogen generation time), used to simulate coalescence events. Names and numbers are allowed. Options are:
|
wh.bottleneck |
Whether the bottleneck should be complete or wide, which is only an option if |
wh.slope |
Within-host slope, used if |
wh.exponent |
Within-host exponent, used if |
wh.level |
Within-host effective pathogen size at transmission, used if |
dist.model |
The distance kernel to use if
|
dist.exponent |
Distance model exponent. |
dist.scale |
Distance model scale, only with power law distance model. |
mu |
Expected number of mutations per nucleotide per unit of time along each lineage. |
sequence.length |
Number of available nucleotides for mutations. |
... |
If arguments from previous versions of this function are used, they may be interpreted correctly through this argument, but it is better to provide the correct argument names. |
The simulation output as an object of class 'phybreakdata'
with sequences (class 'phyDat'
) and
sampling times (which would be the observations), and infection times, infectors, and phylogenetic tree
of class phylo
.
Don Klinkenberg don@xs4all.nl
Klinkenberg et al. (2017) Simultaneous inference of phylogenetic and transmission trees in infectious disease outbreaks. PLoS Comput Biol, 13(5): e1005495.
1 | simulation <- sim_phybreak()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.