Learn R Programming

treats (version 1.0)

crude.bd.est: Crudely estimates extinction and speciation

Description

Very crudely estimates the extinction and speciaton rate of a tree.

Usage

crude.bd.est(tree)

Value

A "bd.params" object to be fed to treats.

Arguments

tree

a "phylo" object.

Author

Thomas Guillerme

Details

This function calculates the extinction rate as the number of extinction events in the tree divided by the tree age (expressed in tree age units - e.g. million years). The speciation rate is calculated as the number of speciation events divided by the tree age. If the input tree has no $root.time element, the speciation and extinction rate are just the number of speciation and extinction events. NOTE that this function is a very crude way to estimate rates of extinction and speciation: the rates are calculated from the raw data (not estimated), ignore sampling biases of the data and the variability in rates. For correct model base approaches see for example birthdeath or bd.ext.

See Also

treats make.bd.params

Examples

Run this code
set.seed(1)
## Generating a random tree
my_tree <- rtree(20)
## Calculating the number of speciations and extinctions events
crude.bd.est(my_tree)

## Adding a root time
my_tree$root.time <- 5
## Calculating the number of speciations and extinctions
## per units of time
crude.bd.est(my_tree)

Run the code above in your browser using DataLab