Description Usage Arguments Value Author(s) References Examples
This function calculates the stairs2 value st2(T) for a given rooted binary tree T. It is defined as the mean ratio between the leaf numbers of the smaller and larger pending subtree over all inner vertices, more precisely
st2(T)=1/(n-1)*∑_{u in V_in(T)} (n_ua/n_ub)
in which V_in(T) denotes the set of all inner vertices
of T, and in which n_ua >= n_ub denote the number of leaves
in the two pending subtrees that are
rooted at the direct descendants of u. The stairs2 value is an imbalance index.
Special cases: For n=1, the function returns st2(T)=0 and a warning.
1 | stairs2(tree)
|
tree |
A rooted binary tree in phylo format. |
stairs2
returns the stairs2 value of the given tree.
Sophie Kersting
C. Colijn and J. Gardy. Phylogenetic tree shapes resolve disease transmission patterns. Evolution, Medicine, and Public Health, 2014(1):96-108, 2014. ISSN 2050-6201. doi: 10.1093/emph/eou018.
1 2 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.