simulate_yule: Ranked topology with Birth-death process depths

Description Usage Arguments Value Author(s) References Examples

View source: R/simulate_yule.R

Description

Simulates the ranked topology with node depths simulated using the constant birth-death process

Usage

1
2
simulate_yule(epsilon, alpha, beta, N, b, d, 
              tmax = Inf, equal.ab = TRUE, eta = 1, lambda = NULL)

Arguments

epsilon

Minimum size of unsampled splits (see appendix 1)

alpha

Clade age-richness index

beta

Imbalance index

N

Tip number

b

Birth rate

d

Death rate

tmax

Maximal crown age

equal.ab

If set to TRUE, all species have the same probability to go extinct first (default to TRUE)

eta

Clade abundance-richness index (if equal.ab == FALSE)

lambda

Optional, vector of lambda_epsilon returned by the function lambda_N. If set to NULL (the default) it will be computed inside the function

Value

A phylo object with ranked shape drawn from our model, with an additional tip.ab field containing a vector of tip abundances.

Author(s)

Odile Maliet, Fanny Gascuel & Amaury Lambert

References

Maliet O., Gascuel F., Lambert A. (2018) Ranked tree shapes, non-random extinctions and the loss of phylogenetic diversity, bioRxiv 224295, doi: https://doi.org/10.1101/224295

Examples

1
2
3
4
5
6
7
8
9
# Simulate a tree
set.seed(813)
tree=simulate_yule(epsilon=0.001,alpha=-1,beta=-1,
                    N=20,equal.ab=FALSE,eta=1.5, b=1, d=0.5)

# Plot the tree with dots at tips that have sizes scaling with log abundance
tree$tip.label = rep(".", length(tree$tip.label))
plot.phylo(tree, show.node.label=TRUE, 
          cex=(log(tree$tip.ab)-min(log(tree$tip.ab)-0.1))*6/diff(range(log(tree$tip.ab))), adj=0.1)

apTreeshape documentation built on Jan. 8, 2021, 2:07 a.m.