areaPerPairI | R Documentation |
This function calculates the area per pair index APP(T)
for a given rooted
tree T
. The tree must not necessarily be binary. APP(T)
is defined as
APP(T)=\frac{2}{n\cdot(n-1)}\cdot\sum_{1\leq i<j\leq n} d_T(i,j)
in which n
denotes the
number of leaves in T
, and
d_T(i,j)
denotes the number of edges on the path between the two
leaves i
and j
. Note that APP(T)
can also be
computed from the Sackin index S(T)
and the total cophenetic
index TCI(T)
of T
as
APP(T)=\frac{2}{n}\cdot S(T)-\frac{4}{n(n-1)}\cdot TCI(T)
enabling efficient computation.
The area per pair index does not fulfill the definition of an (im)balance
index given in "Tree balance indices: a comprehensive survey" (Fischer et al., 2023).
For details on the area per pair index, see
also Chapter 24 in "Tree balance indices: a comprehensive survey" (https://doi.org/10.1007/978-3-031-39800-1_24).
areaPerPairI(tree)
tree |
A rooted tree in phylo format. |
areaPerPairI
returns the area per pair index of the given tree.
Luise Kuehn
T. Araujo Lima, F. M. D. Marquitti, and M. A. M. de Aguiar. Measuring Tree Balance with Normalized Tree Area. arXiv e-prints, art. arXiv:2008.12867, 2020.
tree <- ape::read.tree(text="((((,),),(,)),(((,),),(,)));")
areaPerPairI(tree)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.