designTree {phangorn} | R Documentation |
designTree
and designSplits
compute design matrices for the
estimation of edge length of (phylogenetic) trees using linear models.
designTree
also computes a contrast matrix if the method is "rooted".
designTree(tree, method = "unrooted", ...) designSplits(x, splits = "all", ...)
tree |
an object of class phylo |
method |
design matrix for an "unrooted" or "rooted" ultrametric tree |
x |
number of taxa. |
splits |
one of "all", "star" |
... |
further arguments, passed to other methods. |
a matrix.
Klaus Schliep K.P.Schliep@massey.ac.nz
example(NJ) dm <- as.matrix(dm) y <- dm[lower.tri(dm)] X <- designTree(tree) summary(lm(y~X-1))