| gamPred | R Documentation |
This function will take the community count table and the environmental metadata table as input, and calculate the stability of each site using a generalized additive model (GAM). Alternatively, if no dissimilarity matrix of the community is provided, the function will calculate the community dissimilarity based on Bray-Curtis distance and use it. In GAM, the prediction results are expected to perform better than the linear models.
gamPred(
comtable,
envmeta,
comdist = NULL,
sitenames = NULL,
GAM.dist.method = "manhattan"
)
comtable |
The community table |
envmeta |
The environmental metadata table/matrix |
comdist |
The community dissimilarity matrix (optional, default: NULL) |
sitenames |
The names of the site (optional, default: NULL) |
GAM.dist.method |
The method for calculating dist (default: "manhattan") |
a column vector of predicted stability values for each site
library(vegan)
data(varespec)
data(varechem)
example.stability_GAM <- gamPred(varespec, varechem)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.