varLeafDepI {treebalance}R Documentation

Calculation of the variance of leaf depths index for rooted trees

Description

This function calculates the variance of leaf depths index VLD(T)VLD(T) for a given rooted tree TT. The tree must not necessarily be binary. VLD(T)VLD(T) is defined as

VLD(T)=1nxVL(T)(δ(x)N(T))2VLD(T)=\frac{1}{n}\cdot\sum_{x\in V_L(T)} (\delta(x)-N(T))^2

in which nn denotes the number of leaves of TT, VL(T)V_L(T) denotes the set of leaves of TT, δ(x)\delta(x) denotes the depth of the leaf xx and N(T)N(T) denotes the average leaf depth of TT.

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

For details on the variance of leaf depths, see also Chapter 7 in "Tree balance indices: a comprehensive survey" (https://doi.org/10.1007/978-3-031-39800-1_7).

Usage

varLeafDepI(tree)

Arguments

tree

A rooted tree in phylo format.

Value

varLeafDepI returns the variance of leaf depths index of the given tree.

Author(s)

Sophie Kersting

References

T. M. Coronado, A. Mir, F. Rossello, and L. Rotger. On Sackin's original proposal: the variance of the leaves' depths as a phylogenetic balance index. BMC Bioinformatics, 21(1), 2020. doi: 10.1186/s12859-020-3405-1. URL https://doi.org/10.1186/s12859-020-3405-1.

M. J. Sackin. "Good" and "Bad" Phenograms. Systematic Biology, 21(2):225-226, 1972. doi: 10.1093/sysbio/21.2.225.

K.-T. Shao and R. R. Sokal. Tree Balance. Systematic Zoology, 39(3):266, 1990. doi: 10.2307/2992186.

Examples

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


[Package treebalance version 1.2.0 Index]