Description Usage Arguments Value Author(s) References See Also Examples
sim.bd.age simulates trees conditioned on (i) the time since origin or (ii) the time since the most recent common ancestor of the extant tips. The method allows for incomplete sampling: only a fixed fraction of all tips is included in the sampled tree. The method assumes constant birth and death rates, or allows for a density-dependent birth rate. If you want to have species-age dependent rates, use sim.age in R package TreeSimGM.
1 2 | sim.bd.age(age, numbsim, lambda, mu, frac = 1, mrca = FALSE,
complete = TRUE, K = 0)
|
age |
Time since origin / most recent common ancestor. |
numbsim |
Number of trees to simulate. |
lambda |
Speciation rate. |
K |
If K=0, then lambda is constant. If K>0, density-dependent speciation is assumed, with speciation rate = lambda(1-m/K) when there are m extant species. |
mu |
Extinction rate. |
frac |
Sampling fraction: The actual number of tips is n/frac, but only n tips are included (incomplete sampling). |
mrca |
If mrca=FALSE: age is the time since origin. If mrca=TRUE: age is the time since most recent common ancestor of the extant tips. |
complete |
If complete = TRUE, the tree with the extinct and non-sampled lineages is returned. If complete = FALSE, the extinct and non-sampled lineages are suppressed. |
treearray |
Array of 'numbsim' trees with the time since origin / most recent common ancestor being 'age'. If tree goes extinct or no tips are sampled (only possible when mrca = FALSE), return value is '0'. If only one extant and no extinct tips are sampled, return value is '1'. |
Tanja Stadler
T. Stadler. Simulating trees on a fixed number of extant species. Syst. Biol., 60: 676-684, 2011.
sim.bd.taxa, sim.rateshift.taxa, sim.gsa.taxa, birthdeath.tree, sim.age
1 2 3 4 5 6 7 8 9 10 | age<-2
lambda <- 2.0
mu <- 0.5
frac <-0.6
numbsim<-3
##
# Simulating trees with time age since the origin:
sim.bd.age(age,numbsim,lambda,mu,mrca=FALSE,complete=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.