sppregs function

Regressions to Separate Phylogenetic Attraction and Repulsion

Regressions to Separate Phylogenetic Attraction and Repulsion

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

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.

Note

The function requires the library brglm to perform logistic regressions

Returns

  • 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

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

Author(s)

Matthew Helmus mrhelmus@gmail.com

See Also

phylostruct, phylosignal

  • Maintainer: Steven W. Kembel
  • License: GPL-2
  • Last published: 2020-06-10

Useful links