Re: [R-sig-phylo] optimizing branch length of a tree topology based on a distance matrix

2011-02-17 Thread Klaus Schliep
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

[R-sig-phylo] R: Re: R: Re: Simulation of Continuous Trait with Active Trend

2011-02-17 Thread pasquale.r...@libero.it
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

Re: [R-sig-phylo] R: Re: R: Re: Simulation of Continuous Trait with Active Trend

2011-02-17 Thread Liam J. Revell
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