Description Usage Arguments Value Author(s) References Examples

This function calculates the total cophenetic index *TCI(T)* of a given
rooted tree *T*. The tree must not necessarily be binary. *TCI(T)*
is defined as

*TCI(T)=∑_{1<=i<j<=n} depth(lca(i,j))
=∑_{u in V'_in(T)} binom(n_u,2)*

in which *depth(lca(i,j))* denotes the depth of the last
common ancestor of the two leaves *i* and *j* and *V'_in(T)*
denotes the set of all inner vertices exept the root and *n_u* denotes the
number of descendant leaves of *u*. The second formula is useful for efficient
computation of *TCI(T)*. The total cophenetic index is an imbalance index.

For *n=1* the function returns *TCI(T)=0*.

1 | ```
totCophI(tree)
``` |

`tree` |
A rooted tree in phylo format. |

`totCophI`

returns the total cophenetic index of the given tree.

Sophie Kersting

A. Mir, F. Rosselló, 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.

1 2 3 4 5 6 |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.