| Title: | Phylogenetic Estimation of Shifts in the Tempo of Origination |
|---|---|
| Description: | Implements diversification analyses using the phylogenetic birth-death-shift model. It leverages belief propagation techniques to calculate branch-specific diversification rates, see Kopperud & Hoehna (2025) <doi:10.1093/sysbio/syaf041>. |
| Authors: | Bjørn Tore Kopperud [aut, cre], Sebastian Höhna [aut] |
| Maintainer: | Bjørn Tore Kopperud <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.4.9000 |
| Built: | 2026-05-26 06:20:25 UTC |
| Source: | https://github.com/kopperud/rpesto |
Implements diversification analyses using the phylogenetic birth-death-shift model. It leverages belief propagation techniques to calculate branch-specific diversification rates, see Kopperud & Hoehna (2025) doi:10.1093/sysbio/syaf041.
Kopperud, B. T., & Höhna, S. (2025). Phylogenetic Estimation of branch-specific Shifts in the Tempo of Origination. Systematic Biology, syaf041.
Höhna, S., Freyman, W. A., Nolen, Z., Huelsenbeck, J. P., May, M. R., & Moore, B. R. (2019). A Bayesian approach for estimating branch-specific speciation and extinction rates. BioRxiv, 555805.
Maintainer: Bjørn Tore Kopperud [email protected]
Authors:
Sebastian Höhna
fits the bds model
fit_bds( phy, sampling_fraction, lambda_hat, mu_hat, eta, num_speciation_classes = 6, num_extinction_classes = 6, sd = 0.587, tol = 1e-06, condition_survival = TRUE, condition_root_speciation = TRUE, condition_marginal = FALSE, extinction_approximation = FALSE, verbose = FALSE, numthreads = 0 )fit_bds( phy, sampling_fraction, lambda_hat, mu_hat, eta, num_speciation_classes = 6, num_extinction_classes = 6, sd = 0.587, tol = 1e-06, condition_survival = TRUE, condition_root_speciation = TRUE, condition_marginal = FALSE, extinction_approximation = FALSE, verbose = FALSE, numthreads = 0 )
phy |
an object of type phylo |
sampling_fraction |
the probability that each species was sampled in the tree |
lambda_hat |
the overall scale of the log-normal base distribution for the speciation rates. If not specified, the function will estimate it using ML |
mu_hat |
the overall scale of the log-normal base distribution for the extinction rates. If not specified, the function will estimate it using ML |
eta |
the shift rate parameter. If not specified, the function will estimate it using ML |
num_speciation_classes |
the number of speciation rate class discretizations, such that rate categories is k = n_sp * n_mu |
num_extinction_classes |
the number of extinction rate class discretizations, such that rate categories is k = n_sp * n_mu |
sd |
the spread parameter for the log-normal base distribution |
tol |
the local error threshold in the numerical ODE solver (per delta_t time step) |
condition_survival |
whether or not to condition on the survival of the left and right lineages descending from the root (default TRUE) |
condition_root_speciation |
whether or not to condition on that there was a speciation event at the root node (default TRUE) |
condition_marginal |
whether or condition using the marginal or per-category approach (default FALSE, i.e., to condition per rate category) |
extinction_approximation |
whether or not to approximate the extinction probability calculations, by assuming that rate shift events are not allowed on extinct lineages (default FALSE) |
verbose |
whether or not to print more information |
numthreads |
how many threads to use in likelihood calculation. If 0, then the program uses all available cores |
a list with three items: $model (the parameter estimates), $td (a tidytree object with branch-rate estimates), and $tip_rates (a data frame of the tip rates)
data("primates") analysis <- fit_bds(primates, sampling_fraction = 0.6, numthreads = 2)data("primates") analysis <- fit_bds(primates, sampling_fraction = 0.6, numthreads = 2)
fits the constant-rate birth-death model
fit_cbd( phy, sampling_fraction, tol = 1e-06, condition_survival = TRUE, condition_root_speciation = TRUE, verbose = FALSE )fit_cbd( phy, sampling_fraction, tol = 1e-06, condition_survival = TRUE, condition_root_speciation = TRUE, verbose = FALSE )
phy |
an object of type phylo |
sampling_fraction |
the probability that each species was sampled in the tree |
tol |
the local error threshold in the numerical ODE solver (per delta_t time step) |
condition_survival |
whether or not to condition on the survival of the left and right lineages descending from the root (default TRUE) |
condition_root_speciation |
whether or not to condition on that there was a speciation event at the root node (default TRUE) |
verbose |
whether or not to print more information |
a list with the maximum-likelihood parameter estimates of the speciation rate and the extinction rate
Constructs a phylogeny that lives in the "rust" part of the program
Phylogeny(newick)Phylogeny(newick)
newick |
a newick string |
An object of class environment of length 10.
phy <- Phylogeny$new("((A:0.5,B:0.5):0.5,C:1.0);") phy$print() phy$write_newick()phy <- Phylogeny$new("((A:0.5,B:0.5):0.5,C:1.0);") phy$print() phy$write_newick()
This tree is from Vos & Mooers (2006)
data(primates)data(primates)
An object of class phylo of length 5.
Vos, R. and A. Mooers. 2006. A new dated supertree of the primates. in Inferring large phylogenies: the big tree problem (R Vos, Phd thesis). Simon Fraser University, Burnaby, British Columbia.