[R-sig-phylo] PGLS multiple regression with dummy variables and interaction terms

2015-08-08 Thread Patrick Gemmell
Dear R-sig-phylo list,
I have a non-phylogenetic multiple regression y ~ x1 + ... + xn + d1 + d2 + d3, 
where x1 ... xn are continuous variables and d1, d2 and d3 are dummy variables 
(i.e. for each species in the tree I may have up to 4 data points). In fact, 
sometimes my dummy variables interact with my continuous variables.
Can I perform a similar multiple regression using the PGLS method? I am very 
new to phylogenetic analysis with R, but it seems that both caper and ape need 
to assign tip labels to row names, and of course, such row names would not be 
unique and therefore make R unhappy.
Any advice would be appreciated. Thank you for your time.
-- Patrick



[[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] PGLS multiple regression with dummy variables and interaction terms

2015-08-08 Thread Chris Organ
Dear Patrick,

Sure - see the following as an example (using BayesTraits, but easily
done in R too):

Organ, C. L., A. Canoville, R. R. Reisz, and M. Laurin. (2011).
Paleogenomic data suggest mammal-like genome size in the ancestral
amniote and derived large genome size in amphibians. Journal of
Evolutionary Biology. 24: 372–380.

Best, Chris
_
Chris Organ
Department of Microbiology and Immunology
Department of Earth Sciences
Montana State University, Bozeman, MT 59717
or...@montana.edu
www.organlab.net

On Fri, Aug 7, 2015 at 11:06 AM, Patrick Gemmell
patrick.gemm...@dtc.ox.ac.uk wrote:
 Dear R-sig-phylo list,
 I have a non-phylogenetic multiple regression y ~ x1 + ... + xn + d1 + d2 + 
 d3, where x1 ... xn are continuous variables and d1, d2 and d3 are dummy 
 variables (i.e. for each species in the tree I may have up to 4 data points). 
 In fact, sometimes my dummy variables interact with my continuous variables.
 Can I perform a similar multiple regression using the PGLS method? I am very 
 new to phylogenetic analysis with R, but it seems that both caper and ape 
 need to assign tip labels to row names, and of course, such row names would 
 not be unique and therefore make R unhappy.
 Any advice would be appreciated. Thank you for your time.
 -- Patrick



 [[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] PGLS multiple regression with dummy variables and interaction terms

2015-08-08 Thread Theodore Garland Jr
Dear Patrick,

Yes, many, many examples could be cited, and I'll add a couple of my own below.
More generally, though, remember that there is generally nothing magic about 
phylogenetically informed statistical methods, such as so-called PGLS.
PGLS is just GLS done with use of phylogenetic information.
And GLS is just OLS with some assumptions relaxed.
(Of course, optimal estimation may get a little more complicated in some cases.)
And don't forget that PGLS is the same as Felsenstein's (1985) phylogenetically 
independent contrasts!
(Not including more complicated models that estimate optimal transformations of 
phylogenetic branch lengths.)

Garland, Jr., T., and A. R. Ives. 2000. Using the past to predict the present: 
confidence intervals for regression equations in phylogenetic comparative 
methods. American Naturalist 155:346–364.

Gartner, G. E. A., J. W. Hicks, P. R. Manzani, D. V. Andrade, A. S. Abe, T. 
Wang, S. M. Secor, and T. Garland Jr. 2010. Phylogeny, ecology, and heart 
position in snakes. Physiological and Biochemical Zoology 83:43–54.

Blomberg, S. P., J. G. Lefevre, J. A. Wells, and M. Waterhouse. 2012. 
Independent contrasts and PGLS regression estimators are equivalent. Systematic 
Biology 61:382–391.

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=enuser=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 Chris Organ 
[organch...@gmail.com]
Sent: Saturday, August 08, 2015 8:48 AM
To: Patrick Gemmell; r-sig-phylo@r-project.org
Subject: Re: [R-sig-phylo] PGLS multiple regression with dummy variables and 
interaction terms

Dear Patrick,

Sure - see the following as an example (using BayesTraits, but easily
done in R too):

Organ, C. L., A. Canoville, R. R. Reisz, and M. Laurin. (2011).
Paleogenomic data suggest mammal-like genome size in the ancestral
amniote and derived large genome size in amphibians. Journal of
Evolutionary Biology. 24: 372–380.

Best, Chris
_
Chris Organ
Department of Microbiology and Immunology
Department of Earth Sciences
Montana State University, Bozeman, MT 59717
or...@montana.edu
www.organlab.net

On Fri, Aug 7, 2015 at 11:06 AM, Patrick Gemmell
patrick.gemm...@dtc.ox.ac.uk wrote:
 Dear R-sig-phylo list,
 I have a non-phylogenetic multiple regression y ~ x1 + ... + xn + d1 + d2 + 
 d3, where x1 ... xn are continuous variables and d1, d2 and d3 are dummy 
 variables (i.e. for each species in the tree I may have up to 4 data points). 
 In fact, sometimes my dummy variables interact with my continuous variables.
 Can I perform a similar multiple regression using the PGLS method? I am very 
 new to phylogenetic analysis with R, but it seems that both caper and ape 
 need to assign tip labels to row names, and of course, such row names would 
 not be unique and therefore make R unhappy.
 Any advice would be appreciated. Thank you for your time.
 -- Patrick



 [[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/

___
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/