3 \title{Branch Lengths Computation}
5 compute.brlen(phy, method = "Grafen", power = 1, ...)
8 \item{phy}{an object of class \code{phylo} representing the tree.}
9 \item{method}{the method to be used to compute the branch lengths;
10 this must be one of the followings: (i) \code{"Grafen"} (the
11 default), (ii) a numeric vector, or (iii) a function.}
12 \item{power}{The power at which heights must be raised (see below).}
13 \item{\dots}{further argument(s) to be passed to \code{method} if it is
17 This function computes branch lengths of a tree using different
21 Grafen's (1989) computation of branch lengths: each node is given a
22 `height', namely the number of leaves of the subtree minus one, 0 for
23 leaves. Each height is scaled so that root height is 1, and then
24 raised at power 'rho' (> 0). Branch lengths are then computed as the
25 difference between height of lower node and height of upper node.
27 If one or several numeric values are provided as \code{method}, they
28 are recycled if necessary. If a function is given instead, further
29 arguments are given in place of \code{...} (they must be named, see
32 Zero-length branches are not treated as multichotomies, and thus may
33 need to be collapsed (see \code{\link{di2multi}}).
36 An object of class \code{phylo} with branch lengths.
38 \author{Julien Dutheil \email{julien.dutheil@univ-montp2.fr} and
39 Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
41 Grafen, A. (1989) The phylogenetic regression. \emph{Philosophical
42 Transactions of the Royal society of London. Series B. Biological
43 Sciences}, \bold{326}, 119--157.
46 \code{\link{read.tree}} for a description of \code{phylo} objects,
47 \code{\link{di2multi}}, \code{\link{multi2di}}
51 plot(compute.brlen(bird.orders, 1))
52 plot(compute.brlen(bird.orders, runif, min = 0, max = 5))
53 layout(matrix(1:4, 2, 2))
54 plot(compute.brlen(bird.orders, power=1), main=expression(rho==1))
55 plot(compute.brlen(bird.orders, power=3), main=expression(rho==3))
56 plot(compute.brlen(bird.orders, power=0.5), main=expression(rho==0.5))
57 plot(compute.brlen(bird.orders, power=0.1), main=expression(rho==0.1))