totCophI {treebalance} | R Documentation |
Calculation of the total cophenetic index for rooted trees
Description
This function calculates the total cophenetic index of a given
rooted tree
. The tree must not necessarily be binary.
is defined as
in which denotes the depth of the lowest
common ancestor of the two leaves
and
and
denotes the set of all inner vertices exept the root and
denotes the
number of descendant leaves of
. The second formula is useful for efficient
computation of
. The total cophenetic index is an imbalance index.
For the function returns
.
For details on the total cophenetic index, see
also Chapter 8 in "Tree balance indices: a comprehensive survey" (https://doi.org/10.1007/978-3-031-39800-1_8).
Usage
totCophI(tree)
Arguments
tree |
A rooted tree in phylo format. |
Value
totCophI
returns the total cophenetic index of the given tree.
Author(s)
Sophie Kersting
References
A. Mir, F. Rossello, and L. Rotger. A new balance index for phylogenetic trees. Mathematical Bio-sciences, 241(1):125-136, 2013. doi: 10.1016/j.mbs.2012.10.005.
Examples
tree <- ape::read.tree(text="((((,),),(,)),(((,),),(,)));")
totCophI(tree)
tree <- ape::read.tree(text="((,),((((,),),),(,)));")
totCophI(tree)
tree <- ape::read.tree(text="((,,,),(,,));")
totCophI(tree)