PT - JOURNAL ARTICLE AU - Daijiang Li AU - Russell Dinnage AU - Lucas Nell AU - Matthew R. Helmus AU - Anthony Ives TI - phyr: An R package for phylogenetic species-distribution modelling in ecological communities AID - 10.1101/2020.02.17.952317 DP - 2020 Jan 01 TA - bioRxiv PG - 2020.02.17.952317 4099 - http://biorxiv.org/content/early/2020/02/18/2020.02.17.952317.short 4100 - http://biorxiv.org/content/early/2020/02/18/2020.02.17.952317.full AB - Model-based approaches are increasingly popular in ecological studies. A good example of this trend is the use of joint species distribution models to ask questions about ecological communities. However, most current applications of model-based methods do not include phylogenies despite the well-known importance of phylogenetic relationships in shaping species distributions and community composition. In part, this is due to lack of accessible tools allowing ecologists to fit phylogenetic species distribution models easily.To fill this gap, the R package phyr (pronounced fire) implements a suite of metrics, comparative methods and mixed models that use phylogenies to understand and predict community composition and other ecological and evolutionary phenomena. The phyr workhorse functions are implemented in C++ making all calculations and model estimations fast.phyr can fit a variety of models such as phylogenetic joint-species distribution models, spatiotemporal-phylogenetic autocorrelation models, and phylogenetic trait-based bipartite network models. phyr also estimates phylogenetically independent trait correlations with measurement error to test for adaptive syndromes and performs fast calculations of common alpha and beta phylogenetic diversity metrics. All phyr methods are united under Brownian motion or Ornstein-Uhlenbeck models of evolution and phylogenetic terms are modelled as phylogenetic covariance matrices.The functions and model formula syntax we propose in phyr serves as a simple and unified framework that ignites the use of phylogenies to address a variety of ecological questions.