| gdmPred | R Documentation |
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.
gdmPred(
comdist,
envmeta,
sitenames = NULL,
X = NULL,
Y = NULL,
geo_enabled = TRUE
)
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) |
a column vector of predicted stability values for each site
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
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.