Learn R Programming

poweRbal (version 0.0.1.1)

genFordsAlphaTree: Generation of rooted binary trees under Ford's alpha model

Description

genFordsAlphaTree - Generates a rooted binary tree in phylo format with the given number of n leaves under Ford's alpha model. Ford's alpha model is not a rate-based evolutionary (tree) construction and thus cannot generate edge lengths, only a topology. Instead, it works as follows: The idea is to start with a cherry and incrementally increase the size of the tree by adding a new leaf with a leaf edge to any edge (inner or leaf edge), one at a time. Given a tree with i leaves, then each of the i-1 inner edges (includes an additional root edge) is chosen with probability ALPHA/(i-ALPHA). Each of the i leaf edges is chosen with probability (1-ALPHA)/(i-ALPHA).

Usage

genFordsAlphaTree(n, ALPHA)

Value

genFordsAlphaTree A single tree of class phylo is returned.

Arguments

n

Integer value that specifies the desired number of leaves, i.e., vertices with in-degree 1 and out-degree 0.
Due to the restrictions of the phylo or multiphylo format, the number of leaves must be at least 2 since there must be at least one edge.

ALPHA

Numeric value >=0 and <=1 which specifies the probabilities of picking an inner or a leaf edge. For certain choices of ALPHA Ford's alpha model coincides with known models:

  • ALPHA = 0: Yule model

  • ALPHA = 1/2: PDA model (all phylogenies equally probable)

  • ALPHA = 1: Caterpillar with n leaves

References

  • D. J. Ford. Probabilities on cladograms: introduction to the alpha model, 2005.

  • G. Kaur, K. P. Choi, and T. Wu. Distributions of cherries and pitchforks for the Ford model. Theoretical Population Biology, 149:27–38, 2023.

Examples

Run this code
genFordsAlphaTree(n = 5, ALPHA = 0.3)

Run the code above in your browser using DataLab