Description Details Author(s) References See Also Examples
Inference of a multi-states birth-death model from a phylogeny, comprising a number of states N, birth and death rates for each state and on which edges each state appears. Inference is done using a hybrid approach: states are progressively added in a greedy approach. For a fixed number of states N the best model is selected via maximum likelihood. Reference: J. Barido-Sottani, T. G. Vaughan and T. Stadler (2018) <doi:10.1098/rsif.2018.0512>.
This package was not yet installed at build time.
Index: This package was not yet installed at build time.
Joelle Barido-Sottani [aut, cre]
Maintainer: Joelle Barido-Sottani <joelle.barido-sottani@m4x.org>
J. Barido-Sottani and T. Stadler. Accurate detection of HIV transmission clusters from phylogenetic trees using a multi-state birth-death model, BioRXiv 2017. (https://www.biorxiv.org/content/early/2017/11/10/215491)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # Simulate a random phylogeny
set.seed(25)
tree <- ape::rtree(10)
# Calculate the log likelihood under a multi-states model with 2 states
# and full extant & extinct sampling
likelihood_MSBD(tree, shifts = matrix(c(2,1.8,2), nrow = 1),
gamma = 0.05, lambdas = c(10, 6), mus = c(1, 0.5), sigma = 1)
# Infer the most likely multi-states birth-death model with full extant & extinct sampling
## Not run: ML_MSBD(tree, initial_values = c(0.1, 10, 1), sigma = 1, time_mode = "mid")
# Infer the most likely multi-states birth-death model with exponential decay
# and full extant & extinct sampling
## Not run: ML_MSBD(tree, initial_values = c(0.1, 10, 0.5, 1), sigma = 1,
stepsize = 0.1, time_mode = "mid")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.