glmPred: calculation of stability using a generalized linear model.

View source: R/glmPred.R

glmPredR Documentation

calculation of stability using a generalized linear model.

Description

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).

Usage

glmPred(comdist, envmeta, sitenames = NULL)

Arguments

comdist

The community dissimilarity matrix

envmeta

The environmental metadata table/matrix

sitenames

The names of the site

Value

a column vector of predicted stability values for each site

Examples

library(vegan)
data(varespec)
data(varechem)
example.comdist <- vegdist(varespec)
example.stability_GLM <- glmPred(example.comdist, varechem)


betaStability documentation built on June 5, 2026, 5:08 p.m.