Description Usage Arguments Value Author(s)
simulatetree
does a deterministic simulation of a two-population SIR-model,
takes samples and simulates a phylogenetic tree. For all this, it makes use of phydynR
(https://github.com/emvolz-phylodynamics/phydynR). Then it simulates DNA-sequences for these samples,
with simSeq (phangorn).
1 2 3 4 5 | simulatetree(N = c(100, 10000), beta = array(c(1.5, 0, 0, 2, 1.5, 0, 0.1,
2), dim = c(2, 2, 2)), gamma = 1, mu = 0.05, I0 = c(1, 1), t1 = c(50,
100), res = 1000, sampletimes = c("incidence", "regular"),
samplesize = 200, sampleperiod = c(0, tail(t1, 1)),
sampledist = c("incidence", "popsize", "fixed"), samplebias = 1, ...)
|
N |
the population sizes of the two populations |
beta |
an array of 2x2 transmission rate matrices. The third dimension is the number of matrices, which is the number of time intervals with different transmission rates. Transmission is modelled with frequency-dependent transmission terms (division by N). |
gamma |
the recovery rate |
mu |
the death rate. Births balance deaths. |
I0 |
initial numbers of infecteds. The rest is assumed susceptible. |
t1 |
a vector with times at which the transmission rates change to the next matrix in |
res |
resolution of the epidemic simulation per transmission rate interval (ODE solver) |
sampletimes |
indicates if sampling occurs at random times proportional to incidence (default |
samplesize |
the number of samples to be taken |
sampleperiod |
the time interval from which the sampling times should be taken |
sampledist |
indicates how samples should be divided over the two populations, apart from bias. The default |
samplebias |
indicates the extra weight (multiplication factor) given for sampling the first population
relative to the second. If equal to 1, the weight is completely determined by |
... |
arguments to be passed to simSeq (phangorn) |
A list with a tree (class phylo
), and a set of sequences (class phyDat
), and the
time course of the prevalence (and susceptible populations).
Don Klinkenberg (don@xs4all.nl)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.