dd_SR_sim: Function to simulate the diversity-dependent diversification...

View source: R/dd_SR_sim.R

dd_SR_simR Documentation

Function to simulate the diversity-dependent diversification process with a shift in one or more of the parameters

Description

Simulating the diversity-dependent diversification process with a parameter shift at a certain time

Usage

dd_SR_sim(pars, age, ddmodel = 1)

Arguments

pars

Vector of parameters:

pars[1] corresponds to lambda1 (speciation rate before the rate shift)
pars[2] corresponds to mu1 (extinction rate before the rate shift)
pars[3] corresponds to K1 (clade-level carrying capacity before the rate shift)
pars[4] corresponds to lambda2 (speciation rate after the rate shift)
pars[5] corresponds to mu2 (extinction rate after the rate shift)
pars[6] corresponds to K2 (clade-level carrying capacity after the rate shift)
pars[7] corresponds to the time of shift

age

Sets the crown age for the simulation

ddmodel

Sets the model of diversity-dependence:
ddmodel == 1 : linear dependence in speciation rate with parameter K (= diversity where speciation = extinction)
ddmodel == 1.3 : linear dependence in speciation rate with parameter K' (= diversity where speciation = 0)
ddmodel == 2 : exponential dependence in speciation rate with parameter K (= diversity where speciation = extinction)
ddmodel == 2.1 : variant of exponential dependence in speciation rate with offset at infinity
ddmodel == 2.2 : 1/n dependence in speciation rate
ddmodel == 2.3 : exponential dependence in speciation rate with parameter x (= exponent)
ddmodel == 3 : linear dependence in extinction rate
ddmodel == 4 : exponential dependence in extinction rate
ddmodel == 4.1 : variant of exponential dependence in extinction rate with offset at infinity
ddmodel == 4.2 : 1/n dependence in extinction rate with offset at infinity
ddmodel == 5 : linear dependence in speciation and extinction rate

Value

out

A list with the following four elements: The first element is the tree of extant species in phylo format
The second element is the tree of all species, including extinct species, in phylo format
The third element is a matrix of all species where
- the first column is the time at which a species is born
- the second column is the label of the parent of the species; positive and negative values only indicate whether the species belongs to the left or right crown lineage
- the third column is the label of the daughter species itself; positive and negative values only indicate whether the species belongs to the left or right crown lineage
- the fourth column is the time of extinction of the species If this equals -1, then the species is still extant.
The fourth element is the set of branching times of the tree of extant species.

Author(s)

Rampal S. Etienne

References

- Etienne, R.S. et al. 2012, Proc. Roy. Soc. B 279: 1300-1309, doi: 10.1098/rspb.2011.1439
- Etienne, R.S. & B. Haegeman 2012. Am. Nat. 180: E75-E89, doi: 10.1086/667574

Examples

 dd_SR_sim(c(0.2,0.1,20,0.2,0.1,40,5),10) 

DDD documentation built on July 26, 2023, 5:25 p.m.