Description Usage Arguments Value Author(s) References Examples
The function takes a phybreak
-object containing MCMC-samples, and returns for each host
a table with posterior infectors, with support per infector.
1 2 3 | infectorsets(phybreak.object, which.hosts = "all", percentile = 0.95,
minsupport = 0, samplesize = Inf, infector.name = TRUE,
support = c("proportion", "count"))
|
phybreak.object |
An object of class |
which.hosts |
A vector with hosts (positions in the dataset), or |
percentile |
Return infectors ordered by support, until a cumulative support indicated by |
minsupport |
Only return infectors with more support than |
samplesize |
The number of samples to include (taken from the tail of the MCMC-chain). |
infector.name |
Whether to return the names of the infectors, or their position in the dataset. |
support |
Whether to return the support (= posterior probability) for each infector as a |
A named list with data.frame
s, each with a vector of infectors and a vector of supports.
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 2 3 4 5 6 7 | #First build a phybreak-object containing samples.
simulation <- sim.phybreak(obsize = 5)
MCMCstate <- phybreak(data = simulation$sequences, times = simulation$sample.times)
MCMCstate <- burnin.phybreak(MCMCstate, ncycles = 20)
MCMCstate <- sample.phybreak(MCMCstate, nsample = 50, thin = 2)
infectorsets(MCMCstate)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.