sim.bd {geiger} | R Documentation |
birth-death population simulator
Description
simulating species richness (or population growth) under a uniform, time-homogeneous birth-death process
Usage
sim.bd(b=1, d=0, n0=1, times=0:4, seed=0)
Arguments
b |
per-lineage birth (speciation) rate |
d |
per-lineage death (extinction) rate |
n0 |
number of taxa at starting time zero |
times |
vector of times where extant species are counted |
seed |
random number seed (default is to seed based on the clock) |
Details
This function simulates species diversification under a uniform birth-death process. This differs
from sim.bdtree
in that only the number of species, and not their phylogenetic affinities, are
stored. This function relates to bd.ms
and bd.km
, which are also non-phylogenetic.
Value
a matrix of population size at each time point
Author(s)
RE Glor and LJ Harmon
References
Yule, GU. 1924. A mathematical theory of evolution based on the conclusions of Dr. J. C. Willis, FRS. Philos. Trans. R. Soc. London Ser. B 213:21-87
See Also
Examples
pop1 <- sim.bd(b=0.1, d=0, n0=10, times=1:10)
pop2 <- sim.bd(b=0, d=0.1, n0=10, times=1:10)
pop3 <- sim.bd(b=0.1, d=0.1, n0=10, times=1:10)
plot(pop1, type="l", ylim=c(0,max(c(pop1[,"n"], pop2[,"n"], pop3[,"n"]))))
lines(pop2, col="red")
lines(pop3, col="blue")