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"))sppregsrows = c(1,3) plots in a row; rows = c(3,1) in a columncex in parsamp, 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.phylostruct, phylosignal