View source: R/simulateBirthDeathRich.R
simulateBirthDeathRich | R Documentation |
simulateBirthDeathRich
calculates the number of species at a certain
point in time, following a birth-death process.
simulateBirthDeathRich(t, S = NULL, E = NULL, K = NULL, R = NULL)
t |
Point in time which richness will be simulated. |
S |
A numeric representing the per-capita speciation rate (in number
of events per lineage per million years). Must be larger than |
E |
A numeric representing the per-capita extinction rate (in number
of events per lineage per million years). Must be smaller than |
K |
A numeric representing the extinction fraction (i.e.,
|
R |
A numeric representing the per-capita Net Diversification
rate (i.e., |
The function only accepts as inputs S
and E
, or
K
and R
.
The number of simulated species (i.e., the richness).
Matheus Januario, Daniel Rabosky, Jennifer Auler
Raup, D. M. (1985). Mathematical models of cladogenesis. Paleobiology, 11(1), 42-52.
# running a single simulation:
SS <- 0.40
EE <- 0.09
tt <- 10 #in Mya
simulateBirthDeathRich(t = tt, S = SS, E = EE)
#running many simulations and graphing results:
nSim <- 1000
res <- vector()
for(i in 1:nSim){
res <- c(res,
simulateBirthDeathRich(t = tt, S = SS, E = EE))
}
plot(table(res)/length(res),
xlab="Richness", ylab="Probability")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.