Learn R Programming

TreeTools (version 1.12.0)

TotalCopheneticIndex: Total Cophenetic Index

Description

TotalCopheneticIndex() calculates the total cophenetic index Mir2013TreeTools for any tree, a measure of its balance; TCIContext() lists its possible values.

Usage

TotalCopheneticIndex(x)

TCIContext(x)

# S3 method for numeric TCIContext(x)

Value

TotalCopheneticIndex() returns an integer denoting the total cophenetic index.

TCIContext() returns a data frame detailing the maximum and minimum value obtainable for the Total Cophenetic Index for rooted binary trees with the number of leaves of the given tree, and the expected value under the Yule and Uniform models. The variance of the expected value is given under the Yule model, but cannot be obtained by calculation for the Uniform model.

Arguments

x

A tree of class phylo, its $edge property, or a list thereof.

Details

The Total Cophenetic Index is a measure of tree balance -- i.e. whether a (phylogenetic) tree comprises symmetric pairs of nodes, or has a pectinate "caterpillar" shape. The index has a greater resolution power than Sackin's and Colless' indices, and can be applied to trees that are not perfectly resolved.

For a tree with n leaves, the Total Cophenetic Index can take values of 0 to choose(n, 3). The minimum value is higher for a perfectly resolved (i.e. dichotomous) tree (see Lemma 14 of Mir et al. 2013). Formulae to calculate the expected values under the Yule and Uniform models of evolution are given in Theorems 17 and 23.

Full details are provided by Mir2013;textualTreeTools.

The J1 index Lemant2022TreeTools has advantages over the Total Cophenetic Index, particularly when comparing trees with different numbers of leaves, or where the population size of nodes is meaningful; see J1Index().

References

See Also

  • J1Index() provides a more robust, universal tree balance index.

  • cophen.index() in the package CollessLike provides an alternative implementation of this index and its predecessors.

Other tree characterization functions: CladisticInfo(), Consensus(), J1Index(), Stemwardness

Examples

Run this code
# Balanced trees have the minimum index for a binary tree;
# Pectinate trees the maximum:
TCIContext(8)
TotalCopheneticIndex(PectinateTree(8))
TotalCopheneticIndex(BalancedTree(8))
TotalCopheneticIndex(StarTree(8))


# Examples from Mir et al. (2013):
tree12 <- ape::read.tree(text="(1, (2, (3, (4, 5))));")  #Fig. 4, tree 12
TotalCopheneticIndex(tree12) # 10
tree8  <- ape::read.tree(text="((1, 2, 3, 4), 5);")      #Fig. 4, tree 8
TotalCopheneticIndex(tree8)  # 6
TCIContext(tree8)
TCIContext(5L) # Context for a tree with 5 leaves.

Run the code above in your browser using DataLab