gdm.map: Maps community composition as a result of non-linear...

Description Usage Arguments Value

View source: R/gdm.map.R

Description

This function maps community composition as a result of the non-linear transformation of the predicted GDM dissimilarities.

A GDM model is run on the input site pair dataset ("spData" format), in order to derive the predicted dissimilarities between all possible pairs of sites.

A non-metrical multidimensional scaling (NMDS) is then applied to transform the predicted dissimilarities to extract the main patterns of community composition within the sampled sites. The number of NMDS components to be extracted can be mannually defined by the user (set to 3 per default). Alternatively, if the number of desired components given is set to 0 (zero), the resulting number of components will be automatically defined based on the resulting stress values (of the NMDS) according to a set threshold t (set to 0.1 per default).

It requires a combined site pair dataset ("spData" format), a GDM model object and the number of components (k) to be extracted in the NMDS. If k is set to 0 then requires the stress value threshold t for automatically defining the number of NMDS components to be extracted.

If a map with predictor variables is given (either as raster object or dataframe), these will be assigned (mapped) along the NMDS axes, by comparing the map with the sampled sites (site pair data), following to a k-nearest neighbor imputation approach. The output map will be delivered in the same format as the input map. For this method to work, the input map must have exactly the same predictor variables as those used for the GDM model, and those in the site pair dataset. This option requires the previous instalation of the yalmpute package, and in case a raster object is given as input map it also requires the raster package.

For more details relating to "spData" data format, check gdm package.

Usage

1
gdm.map(spData, predMap, model, k = 0, t = 0.1)

Arguments

spData

Combined site pair dataset ("spData" format). This dataset must include the same predictor variables as those used to build the GDM model below.

predMap

Map with the same prediction variables as used to compile the site pair dataset. This map may be a raster object or a dataframe. The output map will be delivered in the same format as the input predMap. If no variable is given here, the function will only map the community composition on the sampled sites. i.e. the NMDS scores for the site pair data.

model

A GDM model object for dissimilarity prediction.

k

Number of NMDS components to be extracted. Set to 3 per default. If k = 0 then the number of components to be extracted will be automatically defined following the mean NMDS stress value threshold t after 20 iterations.

t

NMDS stress value threshold. Set to 0.1 per default. This variable is only valid if k (above) is set to 0 (zero).

Value

If a predMap is given returns a NMDS map with k number of layers. If no predMap is given returns NMDS scores for k number of components based on the GDM predicted dissimilarities for the site pair data.


sparsegdm/sgdm_package documentation built on May 30, 2019, 6:35 a.m.