phylo.source.attribution: Compute infector probabilities between all pairs of sampled...

Description Usage Arguments Details Value Author(s) References

View source: R/phylo.source.attribution.R

Description

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.

Usage

1
phylo.source.attribution( trees, sampleTimes, f.t, Y.t, maxTMRCA = NULL, res = 1e3, treeErrorTol = 1e-3)

Arguments

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

Details

See vignettes for detailed usage.

Value

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

Author(s)

Erik M Volz

References

Volz, Erik M., and Simon DW Frost. Inferring the source of transmission with phylogenetic data. (2013): e1003397.


rcolgem documentation built on May 2, 2019, 5:28 p.m.