compute.brlen {ape} | R Documentation |
Compute branch lengths.
compute.brlen(phy, method = "Grafen", power = 1)
phy |
An object of class phylo representing the tree. |
method |
The method to use to compute lengths. Only Grafen's 1989 method is implemented for now. |
power |
The power at which heights must be raised (see below). |
Grafen's (1989) computation of branch lengths: Each node is given a 'height', namely the number of leaves of the subtree minus one, 0 for leaves. Each height is scaled so that root height is 1, and then raised at power 'rho' (> 0). Branch lengths are then computed as the difference between height of lower node and height of upper node.
Zero-length branches are not treated as multichotomies, and thus may
need to be collapsed (see di2multi
).
An object of class phylo
with branch lengths.
Julien Dutheil julien.dutheil@univ-montp2.fr
Grafen, A. (1989) The phylogenetic regression. Philosophical Transactions of the Royal society of London. Series B. Biological Sciences, 326, 119–157.
read.tree
for a description of phylo
objects,
di2multi
, multi2di
data(bird.orders) split.screen(c(2,2)) screen(1) plot(compute.brlen(bird.orders, power=1), main=expression(rho==1)) screen(2) plot(compute.brlen(bird.orders, power=3), main=expression(rho==3)) screen(3) plot(compute.brlen(bird.orders, power=0.5), main=expression(rho==0.5)) screen(4) plot(compute.brlen(bird.orders, power=0.1), main=expression(rho==0.1)) close.screen(all=TRUE)