a.g.model: Generates a random tree

Description Usage Arguments Value Author(s) References Examples

View source: R/a.g.model.R

Description

Given alpha, gamma and the number of leaves n, generates a random phylogenetic tree between all trees with n leaves following the alpha-gamma model.

Usage

1
a.g.model(n, alpha, gamma)

Arguments

n

the number of leaves in the tree.

alpha

parametrer of the alpha-gamma model, between 0 and 1.

gamma

parametrer of the alpha-gamma model, between 0 and alpha.

Value

An igraph object that represents the generated phylogenetic tree.

Author(s)

Lucia Rotger

References

B. Chen, D. Ford, M. Winkel, A new family of Markov branching trees: the alpha-gamma model. Electr. J. Probab. 14 (2009), 400-430.

Examples

1
2
3
4
5
6
 

# A phylogenetic tree with 10 leaves and parameters alpha=0.8 and gamma=0.1
tree = a.g.model(10,0.8,0.1)
plot(tree,layout=layout.reingold.tilford(tree,root=which(degree(tree,mode="in")==0)))
 

LuciaRG/CollessLike documentation built on Oct. 12, 2019, 11:19 a.m.