dBD: Birth-death process with species sampling

View source: R/dBD.R

dBDR Documentation

Birth-death process with species sampling

Description

Kernel density function for the birth-death process with species sampling.

Usage

dBD(x, lambda, mu, rho, t1 = 1)

Arguments

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.

Details

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.

Value

A numeric vector of probability densities.

Author(s)

Mario dos Reis

References

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

Examples

# 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)


dosreislab/mcmc3r documentation built on March 29, 2024, 6:45 p.m.