Hi all, This is a reply to an ancient thread that I pasted below. My question is the same as the original one: how to determine the relative order of changes between a discrete and a continuous traits. I came up with the approach I describe below (inspired by Heath Blackmon in the original thread), but I don't feel great about it. So I was wondering if anything better has been developed since, or if anyone has any better ideas.
Here's what I've got: Next, we will test hypothesis 3, that transitions in [discrete trait] occur proximate in time to changes in [continuous trait]. To do that, we will adapt the approach from Blackmon et al. (2015). Briefly, we will first conduct ancestral state estimation of the discrete trait using stochastic character mapping (Huelsenbeck et al. 2003) in phytools, and separately an ancestral state estimation of each continuous trait using the function ace in the package ape (Paradis et al 2023). We will then assess whether the continuous trait displayed a tendency of change either before or after each discrete transition: we will extract the value of the continuous trait at each discrete trait transition, as well as in the immediate parent and ancestral nodes, and calculate the difference between the latter trait values and the value at the transition. We will also generate a null distribution by doing the same based on points sampled randomly along the tree. The overlap between distribution of continuous trait value-changes immediately before/after a transition and the continuous trait value-changes immediately before/after random points will determine if the two characters tend to change near each other in time. For example, if the distribution of continuous trait value-changes immediately before a discrete transition shows little overlap with the random distribution, that would indicate that changes in [redacted continuous-valued] morphology tend to precede changes in [redacted discrete valued ecology]. Likewise, if the distribution of continuous trait value-changes immediately after a discrete transition shows little overlap with the random distribution, that would indicate that changes in [redacted continuous-valued] morphology tend instead to follow changes in [redacted discrete valued ecology]. Thanks! -Rafa *--* *Rafael S. Marcondes, Ph.D.* *https://www.rafaelmarcondes.com/ <https://www.rafaelmarcondes.com/>* Faculty Fellow in EEB Department of BioSciences Rice University Houston TX 77005 Pronouns: he/him *"Eu quase que nada não sei. Mas desconfio de muita coisa"* *"I almost don't know nothing. But I suspect many things"* -João Guimarães Rosa, Brazilian novelist (Portuguese original and free English translation by me) Heath Blackmon <https://www.mail-archive.com/search?l=r-sig-phylo@r-project.org&q=from:%22Heath+Blackmon%22> Mon, 04 Apr 2016 13:26:02 -0700 <https://www.mail-archive.com/search?l=r-sig-phylo@r-project.org&q=date:20160404> An alternative that doesn't require discretization of the continuous trait would be an approach I used inhttp://onlinelibrary.wiley.com/doi/10.1111/evo.12792/abstract. Briefly you do standard ASR of both traits (continuous = ML brownian motion; discrete = stochastic mappings) independently. Then extract the continuous trait value distribution at inferred transition points & compare to a null generated by simulating the discrete trait. If your interested in doing this email me off list and I can give you the latest version of the code for doing this using phytools stochastic mapping results. Cheers Heath On Monday, April 4, 2016, Alejandro Gonzalez Voyer <alejandro.gonza...@iecologia.unam.mx> wrote: > Hello Gavin, > > You could have a look at the method for evolutionary contingency, which > works only for binary traits (meaning you’d have to transform your > continuous trait into a binary one). See Pagel and Meade 2006 (Bayesian > Analysis of Correlated Evolution of Discrete Characters by Reversible-Jump > Markov Chain Monte Carlo in Am Nat) for details on the method. > Note that it will provide information on whether evolutionary transitions > in trait state for one of the traits is contingent on the state of the > second one. You can infer the probable history of transitions from the > results. However, you should be careful as the method is sensitive to > trait-state distribution. > > Cheers > > Alejandro > > > > _______________________________________________ > Dr Alejandro Gonzalez Voyer > > Laboratorio de Conducta Animal > Instituto de Ecología > Circuito Exterior S/N > Ciudad Universitaria > Universidad Nacional Autónoma de México > México, D.F. > 04510 > México > > Tel: +52 55 5622 9044 > E-mail: alejandro.gonza...@iecologia.unam.mx <javascript:;> > Web: www.alejandrogonzalezvoyer.com > > > El 04/04/2016, a las 13:37, Gavin McLean Leighton <gm...@cornell.edu > <javascript:;>> escribió: > > > > Hi all, > > > > > > I have 500 trees of 80 species downloaded from birdtree.org and am > primarily interested in two traits. I have used PGLS to determine the > traits are related but would ideally like to test if there is an order to > trait evolution. To complicate matters one trait (Trait A) is continuous > while the second (Trait B) is presence/absence. I was hoping someone could > direct me to methods (assuming they exist) that would allow me to determine > the estimated value of Trait A before a gain of Trait B evolves in a > lineage. > > > > > > Thank you, > > > > Gavin > > > > > > Gavin Leighton > > NSF Postdoctoral Fellow > > Cornell University > > Cornell Laboratory of Ornithology > > 159 Sapsucker Woods Road > > Ithaca, NY > > http://www.gavinmleighton.com/ > > [[alternative HTML version deleted]] _______________________________________________ R-sig-phylo mailing list - R-sig-phylo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-phylo Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/