Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

sppregs

Regressions to Separate Phylogenetic Attraction and Repulsion


Description

Fit regressions on species abundance or presence/absence across communities and calculate phylogenetic correlations

Usage

sppregs(samp, env, tree=NULL, fam="gaussian")
sppregs.plot(sppreg, rows=c(1,3), cex.mag=1, x.label="phylogenetic correlations", 
    y.label=c("occurrence correlations w/ env", "occurrence correlations wo/ env",
    "change in correlations"))

Arguments

samp

community data matrix, species as columns, communities as rows

env

environmental data matrix

tree

phylo tree object or a phylogenetic covariance matrix

fam

with fam = "gaussian" fits with glm; with fam = "binomial" fit logistic regressions with Firth's bias-reduction using brglm

sppreg

object from function sppregs

rows

rows = c(1,3) plots in a row; rows = c(3,1) in a column

cex.mag

value for cex in par

x.label

x axis labels

y.label

y axis labels

Details

For each species in samp, the function fits regressions of species presence/absence or abundances on the environmental variables supplied in env; and calculates the (n^2-n)/2 pairwise species correlations between the residuals of these fits and pairwise species phylogenetic correlations. The residuals can be thought of as the presence/absence of species across sites/communities after accounting for how species respond to environmental variation across sites. Each set of coefficients can be tested for phylogenetic signal with, for example, the function phylosignal.

The function sppregs.plot produces a set of three plots of the correlations of pairwise species phylogenetic correlations versus: the observed pairwise correlations of species across communities, the residual correlations, and the pairwise differences between (i.e., the change in species co-occurrence once the environmental variables are taken into account). The significance of these correlations can be tested via permutation with the function phylostruct.

Value

family

the regression error distribution

residuals

the residuals from each species regression

coefficients

the estimated coefficients from each species regression

std.errors

the standard errors of the coefficients

correlations

correlations of pairwise species phylogenetic correlations between: the observed pairwise correlations of species across communities, the residual correlations, and the pairwise differences between the two

cors.pa

the observed pairwise correlations of species across communities

cors.resid

the residual pairwise correlations of species across communities

cors.phylo

the phylogenetic pairwise correlations among species

Note

The function requires the library brglm to perform logistic regressions

Author(s)

Matthew Helmus mrhelmus@gmail.com

References

Helmus M.R., Savage K., Diebel M.W., Maxted J.T. & Ives A.R. (2007) Separating the determinants of phylogenetic community structure. Ecology Letters, 10, 917-925

See Also


picante

Integrating Phylogenies and Ecology

v1.8.2
GPL-2
Authors
Steven W. Kembel <steve.kembel@gmail.com>, David D. Ackerly <dackerly@berkeley.edu>, Simon P. Blomberg <s.blomberg1@uq.edu.au>, Will K. Cornwell <cornwell@zoology.ubc.ca>, Peter D. Cowan <pdc@berkeley.edu>, Matthew R. Helmus <mrhelmus@wisc.edu>, Helene Morlon <morlon.helene@gmail.com>, Campbell O. Webb <cwebb@oeb.harvard.edu>
Initial release
2020-06-08

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.