Description Usage Arguments Details Value Author(s) References
View source: R/phylo.source.attribution.R
For each pair of sampled lineages (u,v), the probability that u is the donor and v is the recipient is computed. This is conditional on 1) a genealogy representing the evolutionary history of the pathogen with branches in calendar time 2) the times that each lineage are sampled and 3) a time series of incidence and the number infected in the epidemic.
1 | phylo.source.attribution( trees, sampleTimes, f.t, Y.t, maxTMRCA = NULL, res = 1e3, treeErrorTol = 1e-3)
|
trees |
A list of ape::phylo or a multiPhylo |
sampleTimes |
A named numeric vector providing the time of sampling for each lineage. Should have the same names as trees[[1]]$ tip.label |
f.t |
Either a constant providing constant incidence rate of epidemic or a func(t) giving scalar incidence at time t. |
Y.t |
Either a constant providing constant number of infected hosts rate of epidemic or a func(t) giving scalar number infected at time t. |
maxTMRCA |
Infector probabilities are only computed for pairs with a TMRCA less than this threshold. |
res |
Number of time points used for discrete time approximation |
treeErrorTol |
Margin of error when computing heights of each node in tree given sampleTimes |
See vignettes for detailed usage.
List with components $W: n by n matrix describing the probability that row infected column $missingInfector: Length n vector describing probability that infector of each lineage is not sampled
Erik M Volz
Volz, Erik M., and Simon DW Frost. Inferring the source of transmission with phylogenetic data. (2013): e1003397.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.