Learn R Programming

treestats (version 1.70.5)

ew_colless: Equal weights Colless index of (im)balance.

Description

The equal weights Colless index is calculated as the sum of \(abs(L - R) / (L + R - 2)\) over all nodes where L + R > 2, where L (or R) is the number of extant tips associated with the L (or R) daughter branch at that node. Maximal imbalance is associated with a value of 1.0. The ew_colless index is not sensitive to tree size.

Usage

ew_colless(phy)

Value

colless index

Arguments

phy

phylo object or ltable

References

A. O. Mooers and S. B. Heard. Inferring Evolutionary Process from Phylogenetic Tree Shape. The Quarterly Review of Biology, 72(1), 1997. doi: 10.1086/419657.

Examples

Run this code
simulated_tree <- ape::rphylo(n = 10, birth = 1, death = 0)
balanced_tree <- treestats::create_fully_balanced_tree(simulated_tree)
unbalanced_tree <- treestats::create_fully_unbalanced_tree(simulated_tree)
ew_colless(balanced_tree)
ew_colless(unbalanced_tree) # should be higher

Run the code above in your browser using DataLab