model: Make a species distribution model

Description Usage Arguments Details Value Examples

Description

Returns the model, the performance metrics, and/or distribution maps depending on arguments.

Usage

1
2
3
4
5
6
model(data, method, responsetype, response, predictors, secondary = NULL,
  enviStack, enviPix, seed = NULL, aggregated = NULL,
  pseudoabsence = NULL, gbm.trees = 2000,
  maxargs = c("outputformat=logistic", "defaultprevalence=0.5"),
  model = FALSE, prediction = FALSE, flat = FALSE, moran = FALSE,
  rast = TRUE, rast.occ = TRUE, ...)

Arguments

data

SpatialPointsDataFrame containing response and predictors

method

SDM methos used: "gam", "rf", "gbm", "max", or "gbm.step". See details for details

responsetype

Type of the response: "count", "continuous", or "presence". Presence denotes bimodal responses [0|1]

response

Column name of response in data argument

predictors

Column names of predictors to use in data argument

secondary

Column name in data. Use this to calculate model performance metrics from instead of response. Default is NULL.

enviStack

RasterStack of predictors. Used to calculate SD map

enviPix

SpatialPixelsDataFrame of predictors. enviPix<-as(enviStack,"SpatialPixelsDataFrame"). Only for performance.

seed

Integer. For reproduceability.

aggregated

logical or NULL Default is NULL. This is for ensemble calculations and added to metrics in case of not being NULL

pseudoabsence

logical or NULL Default is NULL. Same as above

gbm.trees

gbm.trees param for dismo::gbm

maxargs

argument to pass tp maxent

model

logical return ONLY the model. Default is FALSE. Overrides args below.

prediction

return ONLY the prediction. Default is FALSE. Overrides args below.

flat

return model performance metrics only (as data.frame)

moran

add spatial autocorrelation metric to model metric. Default is FALSE. See details.

rast

return list of metric and raster

rast.occ

additionally adds bimodal occurence map. see details for threshold calculation.

...

ellipsis is used to pass arguments to subsequent functions like threshold.def and moRange. See metrics moranii for details

Details

SDM methos used are "gam", "rf", "gbm", "max", or "gbm.step". If you want spatial autocorrelation metrics you probably need to pass additional arguments to moranii. Note that calculations may take very long depending on number of points and parametrization #FIXME

Value

A model, or a data.frame or a list depending on arguments

Examples

1
#FIXME

janhoo/quansdm documentation built on May 18, 2019, 2:38 p.m.