| glmPred | R Documentation |
This function will take the dissimilarity matrix and the environmental
matrix as input, and calculate the stability of each site using a generalized
linear model (gLM), where the contributions are constrained as non-negative
lower.limits=0 to ensure the explainability of each coefficient.
The stability is calculated by comparing the predicted distance (based on the
linear model) and the mean measured distance (based on vegdist function).
glmPred(comdist, envmeta, sitenames = NULL)
comdist |
The community dissimilarity matrix |
envmeta |
The environmental metadata table/matrix |
sitenames |
The names of the site |
a column vector of predicted stability values for each site
library(vegan)
data(varespec)
data(varechem)
example.comdist <- vegdist(varespec)
example.stability_GLM <- glmPred(example.comdist, varechem)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.