gdmPred: calculation of stability using a generalized dissimilarity...

View source: R/gdmPred.R

gdmPredR Documentation

calculation of stability using a generalized dissimilarity model.

Description

This function will take the community dissimilarity matrix and the environmental metadata table/matrix as input, and make predictions based on a generalized dissimilarity model (GDM), with optional geographic information (X and Y can be longitude and latitude). This model considers the nonlinear relationship between community dissimilarity and environmental distance, and can also include geographic distance as a predictor.

Usage

gdmPred(
  comdist,
  envmeta,
  sitenames = NULL,
  X = NULL,
  Y = NULL,
  geo_enabled = TRUE
)

Arguments

comdist

The community dissimilarity matrix

envmeta

The environmental metadata table/matrix

sitenames

The names of the site (optional, default: NULL)

X

The X coordinates of the sites (optional, default: NULL)

Y

The Y coordinates of the sites (optional, default: NULL)

geo_enabled

Whether to include geographic info (default: TRUE)

Value

a column vector of predicted stability values for each site

Examples

library(vegan)
data(varespec)
data(varechem)
data(BCI)
data(BCI.env)
example.comdist <- vegdist(varespec)
example.stability_GDM <- gdmPred(example.comdist, varechem)

example.stability_GDM_geo <- gdmPred(vegdist(BCI, "bray"),
    BCI.env[, c("Precipitation", "Elevation", "EnvHet")],
    X = BCI.env$UTM.EW,
    Y = BCI.env$UTM.NS
)


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