Description Usage Arguments Value References Examples
Forward simulates to a number of tips. This function does so using the general algorithm of Hartmann et al. 2010. Short for simulate species tree under birth-death process.
1 2 3 | sim_stBD(sbr, sdr, numbsim, n_tips, gsa_stop_mult = 10L)
sim_sptree_bdp(sbr, sdr, numbsim, n_tips, gsa_stop_mult = 10)
|
sbr |
species birth rate (i.e. speciation rate) |
sdr |
species death rate (i.e. extinction rate) |
numbsim |
number of species trees to simulate |
n_tips |
number of tips to simulate to |
gsa_stop_mult |
number of tips to simulate the GSA tip to |
List of objects of the tree class (as implemented in APE)
K. Hartmann, D. Wong, T. Stadler. Sampling trees from evolutionary models. Syst. Biol., 59(4): 465-476, 2010.
T. Stadler. Simulating trees on a fixed number of extant species. Syst. Biol., 60: 676-684, 2011.
1 2 3 4 5 6 7 8 9 10 11 12 | mu <- 0.5 # death rate
lambda <- 2.0 # birth rate
numb_replicates <- 10
numb_extant_tips <- 4
# simulate trees under the GSA so first simulates a tree with
# numb_extant_tips * 100 tips counting each time we have a tree with 10 tips
# then randomly picks one of those trees
tree_list <- sim_stBD(sbr = lambda,
sdr = mu,
numbsim = numb_replicates,
n_tips = numb_extant_tips)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.