# ewCollessI: Calculation of the equal weights Colless index for rooted... In treebalance: Computation of Tree (Im)Balance Indices

 ewCollessI R Documentation

## Calculation of the equal weights Colless index for rooted binary trees

### Description

This function calculates the equal weights Colless index I_2(T) for a given rooted binary tree T. I_2(T) is defined as

I_2(T)=\frac{1}{n-2}\cdot\sum_{u\in V_{in}(T), n_u>2} \frac{|n_{u_a}-n_{u_b}|}{n_u-2}

in which V_{in}(T) denotes the set of all inner vertices of T, and in which n_u, n_{u_a} and n_{u_b} denote the number of leaves in the pending subtrees that are rooted at u and the two direct descendants of u. The equal weights Colless index is an imbalance index.

For n=1 and n=2 the function returns I_2(T)=0 and a warning.

For details on the equal weigths Colless index, see also Chapter 14 in "Tree balance indices: a comprehensive survey" (https://doi.org/10.1007/978-3-031-39800-1_14).

### Usage

ewCollessI(tree)


### Arguments

 tree A rooted binary tree in phylo format.

### Value

ewCollessI returns the equal weights Colless index of the given tree.

Luise Kuehn

### 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

tree <- ape::read.tree(text="((((,),),(,)),(((,),),(,)));")
ewCollessI(tree)



treebalance documentation built on May 29, 2024, 1:15 a.m.