Description Usage Arguments Details Value Author(s) References Examples
Various methods to create summary transmission trees from a phybreak
object containing posterior samples.
1 2 3 4 
x 
An object of class 
method 
The method used to create the tree (see details). 
samplesize 
The number of posterior samples that is used, taken from the tail. 
infector.name 
Whether to return the infector names, or the position in the vector of hosts. 
support 
Whether to return the support (= posterior probability) for each infector as a 
infection.times 
Whether to base the summary infection times on 
time.quantiles 
Used only if 
phylo.class 
Whether to return an object of class 
Four methods are supported for transmission tree reconstruction (who infected whom).
"count"
gives the most frequent infector from the posterior samples. Note that this may
result in an improper tree (multiple roots and/or cycles). Support is measured by the frequency of the
infector in the posterior distribution.
"edmonds"
starts from the most frequent infector (method "count"
), multiple roots and
cycles are removed by selecting one by one the next most frequent option that minimizes the loss in support
(Edmonds' algorithm). Support is measured by the
frequency of the infector in the posterior distribution.
"mpc" gives the maximum parent credibility tree as described in Hall et al (2015). This is the tree in the set of posterior samples that has maximum support = product of frequencies among all posterior samples. Support is measured by the frequency of the infector in the posterior distribution.
"mtcc" gives the maximum transmission cluster credibility tree. This is equivalent to the maximum clade credibility (mcc) phylogenetic tree, with clusters defined as host + all progeny. Support is measured by the frequency of the cluster in the posterior distribution.
If phylo.class = FALSE
, a data.frame
with per item (=host) its infector and support per
infector (or cluster), and summary infection times. If phylo.class = TRUE
, a class "phylo"
object, a
single tree ("mpc"
or "mtcc"
) from the posterior is returned (not with summary infection times).
Don Klinkenberg [email protected]
Klinkenberg et al. (2017) Simultaneous inference of phylogenetic and transmission trees in infectious disease outbreaks. PLoS Comput Biol, 13(5): e1005495.
1 2 3 4 5 6 7 8 9  #First build a phybreakobject containing samples.
simulation < sim_phybreak(obsize = 5)
MCMCstate < phybreak(dataset = simulation)
MCMCstate < burnin_phybreak(MCMCstate, ncycles = 20)
MCMCstate < sample_phybreak(MCMCstate, nsample = 50, thin = 2)
transtree(MCMCstate, method = "edmonds")
transtree(MCMCstate, method = "mpc", infection.times = "infector.sd")
plot(MCMCstate, plot.which = "mpc")

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.