crude.bd.est {treats} | R Documentation |
Crudely estimates extinction and speciation
Description
Very crudely estimates the extinction and speciaton rate of a tree.
Usage
crude.bd.est(tree)
Arguments
tree |
a |
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
.
Value
A "bd.params"
object to be fed to treats
.
Author(s)
Thomas Guillerme
See Also
Examples
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)