Hi John & Matt.
What about the admittedly ad hoc approach of computing the correlation
between the states at ancestral nodes for x & the squared contrasts for
corresponding nodes for y? Then you can generate a null distribution for
the test statistic (say, a Pearson or Spearman rank correlation) by
simulation. This seems to give reasonable type I error when the null is
correct, and when I simulate under the alternative (i.e., the rate of
Brownian evolution along a branch depends on the state at the
originating node) it sometimes is significant.
Here's a function that does what I've described (I think - please check
it carefully!). It needs phytools and all dependencies.
ratebystate<-function(tree,x,y,nsim=100,method=c("pearson","spearman")){
method<-method[1]
if(!is.binary.tree(tree)) tree<-multi2di(tree)
V<-phyl.vcv(cbind(x,y),vcv(tree),lambda=1)$R
a<-fastAnc(tree,x)
b<-pic(y,tree)[names(a)]^2
r<-cor(a,b,method=method)
beta<-setNames(lm(b~a)$coefficients[2],NULL)
foo<-function(tree,V){
XY<-sim.corrs(tree,V)
a<-fastAnc(tree,XY[,1])
b<-pic(XY[,2],tree)[names(a)]^2
r<-cor(a,b,method=method)
return(r)
}
r.null<-c(r,replicate(nsim-1,foo(tree,V)))
P<-mean(abs(r.null)>=abs(r))
return(list(beta=beta,r=r,P=P,method=method))
}
Perhaps this is a good idea. I don't know. All the best, Liam
Liam J. Revell, Assistant Professor of Biology
University of Massachusetts Boston
web: http://faculty.umb.edu/liam.revell/
email: [email protected]
blog: http://blog.phytools.org
On 3/11/2013 4:03 PM, Matt Pennell wrote:
John,
This is a tricky question. If your independent variables were discrete, you
could use a stochastic character mapping approach to map "state regimes"
onto your tree and ask whether the regimes had different rates using a
model selection approach. (This could be done with the R packages phytools
or ouwie, depending on what models of trait evolution you are interested in
investigating).
However, since your independent variables are continuous, there is no
equivalent of the stochastic mapping approach to answer this question. As
far as I am aware, no model-based framework exists to address your question
(sorry that to be a downer). One could conceivably derive such a model
following Rich Fitzjohn's approach in QuaSSE (Sys Bio 2010) but instead of
the rate of speciation/extinction depending on the state of the continuous
variable, let the rate of a second variable be a function of the state of
the first. But this would certainly be a lot of effort to accomplish.
I agree with you as I do not think getting rates from standardized
independent contrasts (sensu Garland 1992) will really allow you to get at
your question.
the TL;DR version is that no such method exists (at least to my knowledge)
but this would definitely be a useful innovation.
hope this was at least somewhat helpful.
cheers,
matt
On Mon, Mar 11, 2013 at 12:50 PM, john d <[email protected]> wrote:
Dear colleagues,
I got a philosophical/methodological/practical question.
I have a continuous dependent variable (e.g. range size) and a few
"independent" variables (e.g. body mass, encephalization ratio), and I
want to test how the rate of evolution of the dependent variable is
affected by the independent variables. The PCMs that I'm familiar with
cannot be used to answer this question, because they usually try to
predict the dependent variable based on the independent variables
(e.g. PGLM) instead of looking at the rates of evolution. The whole
thing gets tricky if one decides to deal with the rates of evolution
of the indepentent variables as well (or not).
I guess one possibility would be to use standardized independent
contrasts (as in Garland 1992) for the estimation of rates. But I'm
not sure how to try to predict the *rate* of evolution of range size
from the values of the "independent" variables (and not their own
rates, which is what I guess I'd get if I transformed all variables
into standardized contrasts).
Any thoughts?
John
_______________________________________________
R-sig-phylo mailing list - [email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at
http://www.mail-archive.com/[email protected]/
[[alternative HTML version deleted]]
_______________________________________________
R-sig-phylo mailing list - [email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/[email protected]/
_______________________________________________
R-sig-phylo mailing list - [email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/[email protected]/