crude.bd.est: Crudely estimates extinction and speciation

View source: R/crude.bd.est.R

crude.bd.estR 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 "phylo" object.

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

treats make.bd.params

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)


treats documentation built on Nov. 24, 2023, 5:08 p.m.

Related to crude.bd.est in treats...