dBD | R Documentation |
Kernel density function for the birth-death process with species sampling.
dBD(x, lambda, mu, rho, t1 = 1)
x |
numeric, vector of quantiles. |
lambda |
numeric, birth rate. |
mu |
numeric, death rate. |
rho |
numeric, proportion of species sampled. |
t1 |
numeric, age of the phylogeny's root. |
MCMCtree uses the BD kernel to generate the prior on node ages for those nodes without fossil calibrations. You can look at the examples below for some suggestions. Note rho must be between 0 and 1. The special case mu = lambda, rho=0 gives a uniform density. See Yang and Rannala (2006) for full details.
A numeric vector of probability densities.
Mario dos Reis
Yang and Rannala. (2006) Bayesian Estimation of Species Divergence Times Under a Molecular Clock Using Multiple Fossil Calibrations with Soft Bounds. Mol. Biol. Evol., 23: 212–226.
Yang (2014) Molecular Evolution: A Statistical Approach. Oxford University Press
# Reproduce Fig. 10.10 from Yang (2014)
# (a) lambda = mu = 1, rho = 0 (uniform density):
curve(dBD(x, 1, 1, 0), xlim=c(0, 1), ylim=c(0, 4), xaxs="i", yaxs="i")
# (b) lambda = 10, mu = 5, rho = 0.01 (old node ages, useful for diversified
# sampling):
curve(dBD(x, 10, 5, .01), from=0, to=1, lty=2, add=TRUE)
# (c) lambda = 10, mu = 5, rho = 0.001 (old node ages, useful for diversified
# sampling):
curve(dBD(x, 10, 5, .001), from=0, to=1, lty=3, add=TRUE)
# (d) lambda = 10, mu = 5, rho = 0.99 (young node ages, useful for dense
# sampling of diverse phylogenies):
curve(dBD(x, 10, 5, .99), from=0, to=1, lty=4, add=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.