avgVertDep: Calculation of the average vertex depth for rooted trees
Description
This function calculates the average vertex depth \(AVD(T)\) for a given rooted
tree \(T\). The tree must not necessarily be binary. \(AVD(T)\) is defined as
$$AVD(T)=\frac{1}{|V(T)|}\cdot\sum_{x\in V(T)} \delta(x)$$ in
which \(V(T)\) denotes the set of vertices of \(T\), and \(\delta(x)\)
denotes the depth of the vertex \(x\). The average vertex depth is a normalised version of the total path length and an
imbalance index.
For \(n=1\) the function returns \(AVD(T)=0\) and a warning.
For details on the average vertex depth, see
also Chapter 23 in "Tree balance indices: a comprehensive survey" (https://doi.org/10.1007/978-3-031-39800-1_23).
Usage
avgVertDep(tree)
Value
avgVertDep returns the average vertex depth of the given tree.
Arguments
tree
A rooted tree in phylo format.
Author
Luise Kuehn
References
A. Herrada et al. Scaling properties of protein family phylogenies. BMC Evolutionary Biology, 11(1), June 2011. doi: 10.1186/1471-2148-11-155.