Learn R Programming

phytools (version 0.7-20)

fit.bd: Fits birth-death (speciation/extinction) model to reconstructed phylogeny

Description

The function fit.bd fits a birth-death model to a phylogenetic tree with edge lengths and a (potentially) incomplete sampling fraction.

The function fit.yule fits a pure-birth model with a (potentially) incomplete sampling fraction.

The function lik.bd computes the likelihood of a set of birth & death rates given the set of branching times computed for a tree and a sampling fraction.

Usage

fit.bd(tree, b=NULL, d=NULL, rho=1, ...)
fit.yule(tree, b=NULL, d=NULL, rho=1, ...)
lik.bd(theta, t, rho=1, N=NULL)
# S3 method for fit.bd
print(x, ...)

Arguments

tree

object of class "phylo".

b

birth (speciation) rate. Presently doesn't do anything as the rate cannot be fixed.

d

death (extinction) rate. Presently doesn't do anything as the rate cannot be fixed.

rho

sampling fraction.

theta

vector of b and d for likelihood function.

t

branching times for calculation of the likelihood.

N

number of tips in the tree.

x

object of class "fit.bd" for print method.

...

optional arguments.

Value

fit.bd returns an object of class "fit.bd" which can be printed. This object is a list containing the fitted model parameters, likelihood, optimization conditions, a summary of the optimization, and a likelihood function.

fit.yule returns an object of class "fit.yule". This object is a list containing the fitted model parameter, likelihood, optimization conditions, a summary of the optimization, and a likelihood function.

References

Nee, S., May, R. M. and Harvey, P. H. (1994) The reconstructed evolutionary process. Philosophical Transactions of the Royal Society of London B, 344, 305-311.

Stadler, T. (2012) How can we improve the accuracy of macroevolutionary rate estimates? Systematic Biology, 62, 321-329.

Revell, L. J. (2012) phytools: An R package for phylogenetic comparative biology (and other things). Methods Ecol. Evol., 3, 217-223.

See Also

birthdeath

Examples

Run this code
# NOT RUN {
## fit BD & Yule models
bd<-fit.bd(tree,rho=0.8)
yule<-fit.yule(tree,rho=0.8)
## compare fitted models
AIC(yule,bd)
# }

Run the code above in your browser using DataLab