crude.bd.est | R Documentation |
Very crudely estimates the extinction and speciaton rate of a tree.
crude.bd.est(tree)
tree |
a |
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
.
A "bd.params"
object to be fed to treats
.
Thomas Guillerme
treats
make.bd.params
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.