R: sim.bd.taxa.age: Simulating birth-death trees with a given...
sim.bd.taxa.age
R Documentation
sim.bd.taxa.age: Simulating birth-death trees with a given age on a fixed number of extant taxa.
Description
sim.bd.taxa.age simulates trees on n species with a (i) fixed time since origin or (ii) fixed time since the most recent common ancestor of the sampled species under the constant rate birth-death process. The method allows for incomplete sampling, i.e. each extant tip from a complete tree is included with a fixed probability. The tree is conditioned to have n tips after sampling and a fixed time since origin or since the most recent common ancestor of the sampled species.
n<-10
lambda <- 2.0
mu <- 0.5
frac <-0.6
numbsim<-2
age<-2
##
# Simulating numbsim reconstructed trees with n sampled species under a
# birth-death process with speciation rate lambda, extinction rate mu,
# sampling probability frac, and time age since origin:
sim.bd.taxa.age(n, numbsim, lambda, mu, frac, age, mrca = FALSE)
# Simulating numbsim reconstructed trees with n sampled species under a
# birth-death process with speciation rate lambda, extinction rate mu,
# sampling probability frac, and time age since the most recent
# common ancestor of the extant sampled species:
sim.bd.taxa.age(n, numbsim, lambda, mu, frac, age, mrca = TRUE)