Simulate outbreaks of class 'obkData'
(package OutbreakTools), with the outbreak model of phybreak.
1 2 3 4  sim.phybreak(obsize = 50, popsize = NA, R0 = 1.5, shape.gen = 10,
mean.gen = 1, shape.sample = 10, mean.sample = 1, wh.model = 3,
wh.slope = 1, mu = 1e04, sequence.length = 10000,
output.class = c("list", "obkData"))

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 
R0 
The basic reproduction ratio used for simulation. The offspring distribution is Poisson. 
shape.gen 
The shape parameter of the gammadistributed generation interval. 
mean.gen 
The mean generation interval. 
shape.sample 
The shape parameter of the gammadistributed sampling interval. 
mean.sample 
The mean sampling interval. 
wh.model 
The model for withinhost pathogen dynamics (effective pathogen population size = N*gE = actual population size * pathogen generation time), used to simulate coalescence events. Options are:

wh.slope 
Withinhost increase of effective population size, used if 
mu 
Expected number of mutations per nucleotide per unit of time along each lineage. 
sequence.length 
Number of available nucleotides for mutations. 
output.class 
Class of the simulation output. If package OutbreakTools is available, it is possible to choose
class 
The simulation output, either in a list with sequences (class 'phyDat'
) and sampling times (which would be
the observations), and infection times and infectors; or as an object of class 'obkData'
(package OutbreakTools),
containing the outbreak data in the following slots:
a data.frame
with individual labels as row names, a vector infector
,
and a vector date
containing the infection times (starting 01012000)
an object of class 'obkSequences'
, with SNP data in dna
and sampling times
in meta$date
an object of class multiphylo
, containing a single tree of class phylo
Don Klinkenberg don@xs4all.nl
Klinkenberg et al, on biorXiv.
1  simulation < sim.phybreak()

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
Please suggest features or report bugs with the GitHub issue tracker.
All documentation is copyright its authors; we didn't write any of that.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.