sgdm.best: Retrieves the best SGDM model, SCCA canonical components or...

Description Usage Arguments Value

Description

This function retrieves the best SGDM model, SCCA canonical components or SCCA canonical vectors, as resulting from the SGDM parameter estimation with the gdm.train function.

The parameter pair with the lowest RMSE value is selected to run the SCCA on the biological and predictor datasets. If output = "m" delivers the GDM model built on the extracted SCCA components; if output = "c" delivers the SCCA components that result in the best GDM model; and if If output = "v" delivers the SCCA canonical vectors used to tranform the predictor data into the canonical components.

It requires a performance matrix as resulting from the gdm.train function, a predictor dataset ("predData" format), a biological dataset ("bioData" format), the type of output, the number of components to be extracted in the SCCA and the optional use of geographical distance as predictor variable in the GDM.

This current implementation only allows biological data in the format 1 using abundance values, as described in the gdm package.

For more details relating to "bioData" and "predData" data formats, check gdm package.

Usage

1
sgdm.best(perf.matrix, predData, bioData, output = "m", k = 10, geo = F)

Arguments

perf.matrix

Performance matrix as output from sgdm.train function.

predData

Predictor dataset ("predData" format).

bioData

Biological dataset ("bioData" format).

output

Type of output: "m" = gdm model; "c" = sparse canonical components; "v" = sparse canonical vectors; Set as "m" per default.

k

Number of sparce canonical components to be calculated, set as 10 per default

geo

only needed if output = "m"; optional use of geographical distance as predictor in GDM model, set as FALSE per default

Value

Returns a GDM model, the sparse canonical components, or the sparse canonical vectors, depending on the output defined. The default is output = "m", which returns a GDM model object.


steppebird/sparsegdm documentation built on May 16, 2019, 2:55 a.m.