lbi: LBI

Description Usage Arguments Value References Examples

Description

This calculates the local branching index (LBI), defined by Neher, Russell and Shraiman (2014) as the the tree length surrounding a given node or tip exponentially discounted with increasing distance from that node.

Usage

1
lbi(tree, tau = 5e-04, transform = function(x) {     x })

Arguments

tree

a tree of class phylo.

tau

a number giving the scaling factor to use, suggested by Neher et al. to be 0.0625 times the average pairwise distance in the sample.

transform

a function by which to transform the LBI. Default is no transformation.

Value

an vector of class numeric giving the LBI for the tips and internal nodes in the same order as given in the tree phylo object.

References

Neher RA, Russell CA, Shraiman BI (2014) Predicting evolution from the shape of genealogical trees. eLife 3:e03568. doi:10.7554/eLife.03568

Examples

1
2
3
4
tree<-rtree(50)
tree.lbi<-lbi(tree)
tree$node.label<-tree.lbi[(tree$Nnode+2):length(tree.lbi)]
plot(tree, show.node.label = TRUE)

bdearlove/treeImbalance documentation built on May 12, 2019, 3:39 a.m.