A Primer on Phylogenetic Generalised Least Squares

  • Matthew R. E. SymondsEmail author
  • Simon P. Blomberg


Phylogenetic generalised least squares (PGLS) is one of the most commonly employed phylogenetic comparative methods. The technique, a modification of generalised least squares, uses knowledge of phylogenetic relationships to produce an estimate of expected covariance in cross-species data. Closely related species are assumed to have more similar traits because of their shared ancestry and hence produce more similar residuals from the least squares regression line. By taking into account the expected covariance structure of these residuals, modified slope and intercept estimates are generated that can account for interspecific autocorrelation due to phylogeny. Here, we provide a basic conceptual background to PGLS, for those unfamiliar with the approach. We describe the requirements for a PGLS analysis and highlight the packages that can be used to implement the method. We show how phylogeny is used to calculate the expected covariance structure in the data and how this is applied to the generalised least squares regression equation. We demonstrate how PGLS can incorporate information about phylogenetic signal, the extent to which closely related species truly are similar, and how it controls for this signal appropriately, thereby negating concerns about unnecessarily ‘correcting’ for phylogeny. In addition to discussing the appropriate way to present the results of PGLS analyses, we highlight some common misconceptions about the approach and commonly encountered problems with the method. These include misunderstandings about what phylogenetic signal refers to in the context of PGLS (residuals errors, not the traits themselves), and issues associated with unknown or uncertain phylogeny.



We are grateful to László Zsolt Garamszegi for his advice and encouragement during the writing of this chapter. Alan Grafen provided insightful comments on an earlier draft.


  1. Abouheif E (1998) Random trees and the comparative method: a cautionary tale. Evolution 52:1197–1204CrossRefGoogle Scholar
  2. Abouheif E (1999) A method for testing the assumption of phylogenetic independence in comparative data. Evol Ecol Res 1:895–909Google Scholar
  3. Bates D (2000) fortunes: R fortunes. R package version 1.5-0,
  4. Bininda-Emonds ORP (ed) (2004) Phylogenetic supertrees: combining information to reveal the tree of life. Kluwer Academic Publishers, DordrechtGoogle Scholar
  5. Björklund M (1997) Are ‘comparative methods’ always necessary? Oikos 80:607–612CrossRefGoogle Scholar
  6. Blomberg SP, Garland T Jr (2002) Tempo and mode in evolution: phylogenetic inertia, adaptation and comparative methods. J Evol Biol 15:899–910CrossRefGoogle Scholar
  7. Blomberg SP, Garland T Jr, Ives AR (2003) Testing for phylogenetic signal in comparative data: behavioral traits are more labile. Evolution 57:717–745CrossRefGoogle Scholar
  8. Blomberg SP, Lefevre JG, Wells JA, Waterhouse M (2012) Independent contrasts and PGLS regression estimators are equivalent. Syst Biol 61:382–391CrossRefGoogle Scholar
  9. Bonduriansky R (2007) Sexual selection and allometry: a critical reappraisal of the evidence and ideas. Evolution 61:838–849CrossRefGoogle Scholar
  10. Butler MA, King AA (2004) Phylogenetic comparative analysis: a modelling approach for adaptive evolution. Am Nat 164:683–695CrossRefGoogle Scholar
  11. Crane J (1975) Fiddler crabs of the Wworld: ocypodidae: genus Uca. Princeton University Press, PrincetonGoogle Scholar
  12. De Villemereuil P, Wells JA, Edwards RD, Blomberg SP (2012) Bayesian models for comparative analysis integrating phylogenetic uncertainty. BMC Evol Biol 12:102CrossRefGoogle Scholar
  13. Díaz-Uriarte R, Garland T Jr (1998) Effects of branch lengths errors on the performance of phylogenetically independent contrasts. Syst Biol 47:654–672CrossRefGoogle Scholar
  14. Felsenstein J (1973) Maximum-likelihood estimation of evolutionary trees from continuous characters. Am J Human Genet 25:471–492Google Scholar
  15. Felsenstein J (1985) Phylogenies and the comparative method. Am Nat 125:1–15CrossRefGoogle Scholar
  16. Freckleton RP (2009) The seven deadly sins of comparative analysis. J Evol Biol 22:1367–1375CrossRefGoogle Scholar
  17. Freckleton RP, Harvey PH, Pagel M (2002) Phylogenetic analysis and comparative data: a test and review of evidence. Am Nat 160:712–726CrossRefGoogle Scholar
  18. Fritz SA, Purvis A (2010) Selectivity in mammalian extinction risk and threat types: a new measure of phylogenetic signal strength in binary traits. Conserv Biol 24:1042–1051CrossRefGoogle Scholar
  19. Garamszegi LZ, Møller AP (2010) Effects of sample size and intraspecific variation in phylogenetic comparative studies: a meta-analytic review. Biol Rev 85:797–805Google Scholar
  20. Garamszegi LZ, Calhim S, Dochtermann N, Hegyi G, Hurd PL, Jørgensen C, Kutsukake N, Lajeunesse MJ, Pollard KA, Schielzeth H, Symonds MRE, Nakagawa S (2009) Changing philosophies and tools for statistical inferences in behavioral ecology. Behav Ecol 20:1363–1375CrossRefGoogle Scholar
  21. Garland T Jr, Ives AR (2000) Using the past to predict the present: confidence intervals for regression equations in phylogenetic comparative methods. Am Nat 155:346–364CrossRefGoogle Scholar
  22. Garland T Jr, Harvey PH, Ives AR (1992) Procedures for the analysis of comparative data using phylogenetically independent contrasts. Syst Biol 41:18–32CrossRefGoogle Scholar
  23. Gittleman JL, Kot M (1990) Adaptation: statistics and a null model for estimating phylogenetic effects. Syst Zool 39:227–241CrossRefGoogle Scholar
  24. Grafen A (1989) The phylogenetic regression. Phil Trans R Soc B 326:119–157CrossRefGoogle Scholar
  25. Grafen A (2014) phyreg: Implements the phylogenetic regression of Grafen (1989).
  26. Hansen TF (1997) Stabilizing selection and the comparative analysis of adaptation. Evolution 51:1341–1351CrossRefGoogle Scholar
  27. Hansen TF, Pienaar J, Orzack SH (2008) A comparative method for studying adaptation to a randomly evolving environment. Evolution 62:1965–1977PubMedPubMedCentralGoogle Scholar
  28. Harvey PH (1991) Comparing uncertain relationships: the Swedes in revolt. Trends Ecol Evol 6:38–39CrossRefGoogle Scholar
  29. Harvey PH, Pagel MD (1991) The comparative method in evolutionary biology. Oxford University Press, OxfordGoogle Scholar
  30. Huey RB (1987) Phylogeny, history and the comparative method. In: Feder ME, Bennett AF, Burggren WW, Huey RB (eds) New directions in ecological physiology. Cambridge University Press, Cambridge, pp 76–101Google Scholar
  31. Ives AR, Garland T Jr (2010) Phylogenetic logistic regression for binary dependent variables. Syst Biol 59:9–26CrossRefGoogle Scholar
  32. Ives AR, Midford PE, Garland T Jr (2007) Within-species variation and measurement error in phylogenetic comparative methods. Syst Biol 56:252–270CrossRefGoogle Scholar
  33. Kamilar JM, Cooper N (2013) Phylogenetic signal in primate behaviour, ecology and life history. Phil Trans R Soc B 368:20120341CrossRefGoogle Scholar
  34. Kembel SW, Cowan PD, Helmus MR, Cornwell WK, Morlon H, Ackerly DD, Blomberg SP, Webb CO (2010) Picante: R tools for integrating phylogenies and ecology. Bioinformatics 26:1463–1464CrossRefGoogle Scholar
  35. Lumley T (2009) fortunes: R fortunes. R package version 1.5-0,
  36. Losos JB (2011) Seeing the forest for the trees: the limitations of phylogenies in comparative biology. Am Nat 177:709–727CrossRefGoogle Scholar
  37. Maddison DR, Swofford DL, Maddison WP (1997) Nexus: an extensible file format for systematic information. Syst Biol 46:590–621CrossRefGoogle Scholar
  38. Maddison WP (1990) A method for testing the correlated evolution of two binary characters: are gains or losses concentrated on certain branches of a phylogenetic trees? Evolution 44:539–557CrossRefGoogle Scholar
  39. Maddison WP (2000) Testing character correlation using pairwise comparisons on a phylogeny. J Theor Biol 202:195–204CrossRefGoogle Scholar
  40. Martins EP (2004) COMPARE. Version 4.6b. Computer programs for the statistical analysis of comparative data. Department of Biology, Indiana University, Bloomington.
  41. Martins EP, Hansen TF (1997) Phylogenies and the comparative method: a general approach to incorporating phylogenetic information into the analysis of interspecific data. Am Nat 149:646–667CrossRefGoogle Scholar
  42. Martins EP, Housworth EA (2002) Phylogeny shape and the phylogenetic comparative method. Syst Biol 51:873–880CrossRefGoogle Scholar
  43. Menard S (2000) Coefficients of determination for multiple logistic regression analysis. Am Stat 54(1):17–24Google Scholar
  44. Münkemüller T, Lavergne S, Bzeznik B, Dray S, Jombart T, Schiffers K, Thuiller W (2012) How to measure and test phylogenetic signal. Methods Ecol Evol 3:743–756CrossRefGoogle Scholar
  45. Orme D, Freckleton R, Thomas G, Petzoldt T, Fritz S, Isaac N, Pearse W (2012) caper: comparative analysis of phylogenetics and evolution in R.
  46. Pagel MD (1992) A method for the analysis of comparative data. J Theor Biol 156:431–442CrossRefGoogle Scholar
  47. Pagel M (1994) Detecting correlated evolution on phylogenies: a general method for the comparative analysis of discrete characters. Proc R Soc B 255:37–45CrossRefGoogle Scholar
  48. Pagel M (1997) Inferring evolutionary processes from phylogenies. Zool Scripta 26:331–348CrossRefGoogle Scholar
  49. Pagel M (1999) Inferring the historical patterns of biological evolution. Nature 401:877–884CrossRefGoogle Scholar
  50. Pagel M, Meade A (2013) BayesTraits version 2.0 (Beta). University of Reading.
  51. Paradis E, Claude J (2002) Analysis of comparative data using generalized estimating equations. J Theor Biol 218:175–185CrossRefGoogle Scholar
  52. Paradis E, Claude J, Strimmer K (2004) APE: analysis of phylogenetics and evolution in R language. Bioinformatics 20:289–290CrossRefGoogle Scholar
  53. Pearse WD, Purvis A (2013) phyloGenerator: an automated phylogeny generation tool for ecologists. Methods Ecol Evol 4:692–698CrossRefGoogle Scholar
  54. Pinheiro JC, Bates DM (2000) Mixes-effects models in S and S-PLUS. Springer, BerlinCrossRefGoogle Scholar
  55. Pinheiro J, Bates D, DebRoy S, Sarker D, R Development Core Team (2013) nlme: linear and nonlinear mixed effects models. R package version 3.1-111.
  56. Promislow DEL, Harvey PH (1990) Living fast and dying young: a comparative analysis of life-history variation among mammals. J Zool 220:417–437CrossRefGoogle Scholar
  57. Purvis A, Garland T Jr (1993) Polytomies in comparative analysis of continuous characters. Syst Biol 42:569–575CrossRefGoogle Scholar
  58. Purvis A, Gittleman JL, Luh H-K (1994) Truth or consequences: effects of phylogenetic accuracy on two comparative methods. J Theor Biol 167:293–300CrossRefGoogle Scholar
  59. Revell LJ (2010) Phylogenetic signal and linear regression on species data. Methods Ecol Evol 1:319–329CrossRefGoogle Scholar
  60. Revell LJ (2012) phytools: an R package for phylogenetic comparative biology (and other things). Methods Ecol Evol 3:217–223CrossRefGoogle Scholar
  61. Revell LJ, Reynolds RG (2012) A new Bayesian method for fitting evolutionary models to comparative data with intraspecific variation. Evolution 66:2697–2707CrossRefGoogle Scholar
  62. Revell LJ, Harmon LJ, Collar DC (2008) Phylogenetic signal, evolutionary process and rate. Syst Biol 57:591–601CrossRefGoogle Scholar
  63. Rheindt FE, Grafe TU, Abouheif E (2004) Rapidly evolving traits and the comparative method: how important is testing for phylogenetic signal? Evol Ecol Res 6:377–396Google Scholar
  64. Ridley M (1983) The explanation of organic diversity. Oxford University Press, OxfordGoogle Scholar
  65. Rohlf FJ (2001) Comparative methods for the analysis of continuous variables: geometric interpretations. Evolution 55:2143–2160CrossRefGoogle Scholar
  66. Rosenberg MS (2001) The systematics and taxonomy of fiddler crabs: a phylogeny of the genus Uca. J Crust Biol 21:839–869CrossRefGoogle Scholar
  67. Rosenberg MS (2002) Fiddler crab claw shape variation: a geometric morphometric analysis across the genus Uca (Crustacea: Brachyura: Ocypodidae). Biol J Linn Soc 75:147–162Google Scholar
  68. Stone EA (2011) Why the phylogenetic regression appears robust to tree misspecification. Syst Biol 60:245–260CrossRefGoogle Scholar
  69. Symonds MRE (2002) The effects of topological inaccuracy in evolutionary trees on the phylogenetic comparative method of independent contrasts. Syst Biol 51:541–553CrossRefGoogle Scholar
  70. Symonds MRE, Elgar MA (2002) Phylogeny affects estimation of metabolic scaling in mammals. Evolution 56:2330–2333CrossRefGoogle Scholar
  71. Westoby M, Leishman MR, Lord JM (1995) On misinterpreting the ‘phylogenetic correction’. J Ecol 83:531–534CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2014

Authors and Affiliations

  1. 1.Centre for Integrative Ecology, School of Life and Environmental SciencesDeakin UniversityBurwoodAustralia
  2. 2.School of Biological SciencesThe University of QueenslandSt LuciaAustralia

Personalised recommendations