Hi Sebastian,
the phangorn package contains a function to construct design matrices
from a tree (class phylo from ape).
library(phangorn)
X = designTree(tree, method = unrooted)
dm = as.matrix(dm)[tree$tip, tree$tip]
y = dm[lower.tri(dm)]
lm(y~X-1) # a normal Least Squares fit
There are
Hi all,
to feed Dave's questions; I have body size data (showing high phylogenetic
signal) and a trend verified independently (Cope's). Although all species in
the tree are in fact fossil species, I derived from it a number of trees which
are time-interval phylogenies, restricted to species
Hi Pasquale,
I think this may be possible if all tips are not contemporaneous.
As Gene points out, the values at the tips of the tree given a trend
should be distributed as ~MVN(mu=diag(vcv(tree))*tr+ancestor,
V=vcv(tree)*sig2). Thus, we should be able to compute the likelihood of
any data