mlPred: calculation of stability using multiple linear regression...

View source: R/mlPred.R

mlPredR Documentation

calculation of stability using multiple linear regression model.

Description

This function will take the diversity matrix and the environmental distance matrix as input, and calculate the stability of each site using multiple linear model (ML). The stability is calculated by comparing the predicted distance (based on the multiple linear model) and the mean measured distance between the site and other sites (based on the difference of envmeta and the corresponding comdist).

Usage

mlPred(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_ML <- mlPred(example.comdist, varechem)


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