Re: [R-sig-phylo] Testing for relationship between one categorical and one continuous variable in a phylogenetic framework.
Thanks everyone, exactly what I needed! Went ahead and used threshBayes since I only have two characters, and indeed 95% HPD of r was > 0 (ESS > 1,000). Thanks so much for all the advice! Sean On Sat, Apr 9, 2016 at 11:23 AM, Joe Felsenstein wrote: > Liam -- > > Thanks, I had a "senior moment" and have been corrected: Rphylip, not > Phytools. > > Joe > > Joe Felsenstein j...@gs.washington.edu > Department of Genome Sciences and Department of Biology, > University of Washington, Box 355065, Seattle, WA 98195-5065 USA > > [[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/ > [[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/
Re: [R-sig-phylo] Testing for relationship between one categorical and one continuous variable in a phylogenetic framework.
Liam -- Thanks, I had a "senior moment" and have been corrected: Rphylip, not Phytools. Joe Joe Felsenstein j...@gs.washington.edu Department of Genome Sciences and Department of Biology, University of Washington, Box 355065, Seattle, WA 98195-5065 USA [[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/
Re: [R-sig-phylo] Testing for relationship between one categorical and one continuous variable in a phylogenetic framework.
Just to clarify Joe's email - Threshml can be called using my package with Scott Chamberlain called Rphylip (not phytools). It is on CRAN; however, Rphylip is just a 'wrapper' for PHYLIP, which still needs to be installed locally. In the future we may change Rphylip so that it is packaged with the source code of PHYLIP and so it calls the C source code directly, since I believe that PHYLIP's current license permits this. A simpler, Bayesian MCMC implementation of the threshold model that permits only two characters is also available in the function threshBayes in the phytools package. All the best, Liam Liam J. Revell, Associate Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev...@umb.edu blog: http://blog.phytools.org On 4/8/2016 5:50 PM, Joe Felsenstein wrote: Sean -- ... or, if you want to do it *really correctly*, you can use the threshold model of Sewall Wright for the discrete character and use the MCMC approach that I proposed in 2012: Felsenstein, J. 2012. A comparative method for both discrete and continuous characters using the threshold model. American Naturalist 179: 145-156. which is implemented in my program Threshml which can be called from Liam Revell's Phytools R package. It also works for multiple threshold characters and multiple continuous characters. Joe Joe Felsenstein j...@gs.washington.edu Department of Genome Sciences and Department of Biology, University of Washington, Box 355065, Seattle, WA 98195-5065 USA [[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/ ___ 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/
Re: [R-sig-phylo] Testing for relationship between one categorical and one continuous variable in a phylogenetic framework.
Sean -- ... or, if you want to do it *really correctly*, you can use the threshold model of Sewall Wright for the discrete character and use the MCMC approach that I proposed in 2012: Felsenstein, J. 2012. A comparative method for both discrete and continuous characters using the threshold model. American Naturalist 179: 145-156. which is implemented in my program Threshml which can be called from Liam Revell's Phytools R package. It also works for multiple threshold characters and multiple continuous characters. Joe Joe Felsenstein j...@gs.washington.edu Department of Genome Sciences and Department of Biology, University of Washington, Box 355065, Seattle, WA 98195-5065 USA [[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/
Re: [R-sig-phylo] Testing for relationship between one categorical and one continuous variable in a phylogenetic framework.
Alejandro is correct. You can also do it with phylogenetically independent contrasts or computer simulations: Garland Jr., T., P. H. Harvey, and A. R. Ives. 1992. Procedures for the analysis of comparative data using phylogenetically independent contrasts. Systematic Biology 41:18–32. Garland, T., Jr., A. W. Dickerman, C. M. Janis, and J. A. Jones. 1993. Phylogenetic analysis of covariance by computer simulation. Systematic Biology 42:265–292. Cheers, Ted Theodore Garland, Jr., Professor Department of Biology University of California, Riverside Riverside, CA 92521 Office Phone: (951) 827-3524 Facsimile: (951) 827-4286 (not confidential) Email: tgarl...@ucr.edu http://www.biology.ucr.edu/people/faculty/Garland.html http://scholar.google.com/citations?hl=en&user=iSSbrhwJ Director, UCR Institute for the Development of Educational Applications Editor in Chief, Physiological and Biochemical Zoology Fail Lab: Episode One http://testtube.com/faillab/zoochosis-episode-one-evolution http://www.youtube.com/watch?v=c0msBWyTzU0 From: R-sig-phylo [r-sig-phylo-boun...@r-project.org] on behalf of Alejandro Gonzalez Voyer [alejandro.gonza...@iecologia.unam.mx] Sent: Friday, April 08, 2016 2:01 PM To: Sean McKenzie Cc: R-phylo Mailing-list Subject: Re: [R-sig-phylo] Testing for relationship between one categorical and one continuous variable in a phylogenetic framework. Hello Sean, If the continuous variable is the “response” and the “independent” variable the discrete one, you can use PGLS, this would be akin to an ANOVA and you can do it accounting for phylogenetic non-independence. Is this what you were after? 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 Web: www.alejandrogonzalezvoyer.com > El 08/04/2016, a las 15:56, Sean McKenzie escribió: > > Hello, I have a two traits, one categorical (binary) and one continuous, > and I want to test for a relationship between them accounting for > phylogenetic signal. I have found a plethora of sources for examining > relationships between multiple categorical traits and many others for > examining multiple continuous traits, but I have been hard pressed to find > a test for one categorical and one continuous trait. A random blog post I > stumbled across said I could use either standard phylogenetic independent > contrasts (e.g. pic in ape) or general estimating equations (e.g. > compar.gee in ape). Unfortunately the examples only used continuous data > and tested for significance with regressions through the origin (e.g. > lm(var1_pic ~ var2_pic - 1) or compar.gee(var1 ~ var2 - 1, phy = tree) ). > This seems wrong when one variable was categorical, no? > > So, are PICs and PGEEs really appropriate for a single categorical and a > single continuous variable? If so, what is the appropriate way to test for > significance? If not, or if there's a better way, how can I test this? > > Thanks! > > Sean > > [[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/ [[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/ ___ 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/
Re: [R-sig-phylo] Testing for relationship between one categorical and one continuous variable in a phylogenetic framework.
Hello Sean, If the continuous variable is the “response” and the “independent” variable the discrete one, you can use PGLS, this would be akin to an ANOVA and you can do it accounting for phylogenetic non-independence. Is this what you were after? 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 Web: www.alejandrogonzalezvoyer.com > El 08/04/2016, a las 15:56, Sean McKenzie escribió: > > Hello, I have a two traits, one categorical (binary) and one continuous, > and I want to test for a relationship between them accounting for > phylogenetic signal. I have found a plethora of sources for examining > relationships between multiple categorical traits and many others for > examining multiple continuous traits, but I have been hard pressed to find > a test for one categorical and one continuous trait. A random blog post I > stumbled across said I could use either standard phylogenetic independent > contrasts (e.g. pic in ape) or general estimating equations (e.g. > compar.gee in ape). Unfortunately the examples only used continuous data > and tested for significance with regressions through the origin (e.g. > lm(var1_pic ~ var2_pic - 1) or compar.gee(var1 ~ var2 - 1, phy = tree) ). > This seems wrong when one variable was categorical, no? > > So, are PICs and PGEEs really appropriate for a single categorical and a > single continuous variable? If so, what is the appropriate way to test for > significance? If not, or if there's a better way, how can I test this? > > Thanks! > > Sean > > [[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/ [[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/
[R-sig-phylo] Testing for relationship between one categorical and one continuous variable in a phylogenetic framework.
Hello, I have a two traits, one categorical (binary) and one continuous, and I want to test for a relationship between them accounting for phylogenetic signal. I have found a plethora of sources for examining relationships between multiple categorical traits and many others for examining multiple continuous traits, but I have been hard pressed to find a test for one categorical and one continuous trait. A random blog post I stumbled across said I could use either standard phylogenetic independent contrasts (e.g. pic in ape) or general estimating equations (e.g. compar.gee in ape). Unfortunately the examples only used continuous data and tested for significance with regressions through the origin (e.g. lm(var1_pic ~ var2_pic - 1) or compar.gee(var1 ~ var2 - 1, phy = tree) ). This seems wrong when one variable was categorical, no? So, are PICs and PGEEs really appropriate for a single categorical and a single continuous variable? If so, what is the appropriate way to test for significance? If not, or if there's a better way, how can I test this? Thanks! Sean [[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/