ENMevaluate_b: Tuning and evaluation of ENMs with Maxent for several species...

View source: R/3.f.tuning.R

ENMevaluate_bR Documentation

Tuning and evaluation of ENMs with Maxent for several species using ENMeval

Description

This function is a wrapper for ENMeval::ENMevaluate. See ?ENMeval::ENMevaluate for details It works with a named list of species occurrence data (occ.l) and a list of cropped environmental variables (a.calib.l) for model tuning.

Usage

ENMevaluate_b(
  occ.l,
  a.calib.l,
  bg.coords.l = NULL,
  occ.grp.l = NULL,
  bg.grp.l = NULL,
  RMvalues = seq(0.5, 4.5, 0.5),
  fc = c("L", "P", "Q", "H", "LP", "LQ", "LH", "PQ", "PH", "QH", "LPQ", "LPH", "LQH",
    "PQH", "LPQH"),
  categoricals = NULL,
  n.bg = 10000,
  method = "block",
  algorithm = "maxnet",
  overlap = FALSE,
  aggregation.factor = c(2, 2),
  kfolds = NA,
  bin.output = FALSE,
  clamp = TRUE,
  rasterPreds = TRUE,
  parallel = FALSE,
  numCores = NULL,
  progbar = TRUE,
  updateProgress = FALSE,
  resultsOnly = F,
  ...
)

Arguments

occ.l

list of species occurrence data

a.calib.l

list of predictors (cropped environmental variables) for model tuning. Used in model calibration. Argument 'x' of dismo::maxent. Raster* object or SpatialGridDataFrame, containing grids with predictor variables. These will be used to extract values from for the point locations. Can also be a data.frame, in which case each column should be a predictor variable and each row a presence or background record.

bg.coords.l

list of background localities. Two-column matrix or data.frame of longitude and latitude (in that order) of background localities (required for 'user' method).

occ.grp.l

list containing a vector of bins of occurrence localities (required for 'user' method) for each species.

bg.grp.l

list containing a vector of bins of occurrence localities (required for 'user' method) for each species.

RMvalues

Vector of (non-negative) values to use for the regularization multiplier.

fc

Character vector of feature class combinations to be included in analysis.

categoricals

Vector indicating which (if any) of the input environmental layers are categorical.

n.bg

The number of random background localities to draw from the study extent.

method

Character string designating the method used for data partitioning. Choices are: "jackknife", "randomkfold", "user", "block", "checkerboard1", "checkerboard2". See details and get.evaluation.bins for more information.

algorithm

Character vector. Use 'maxnet' to use the maxnet package [default] or 'maxent.jar' to use the dismo package and the 'maxent.jar' Java program. See details for more information on these different implementations.

overlap

logical; If TRUE, provides pairwise metric of niche overlap (see details and calc.niche.overlap).

aggregation.factor

List giving the factor by which the original input grid should be aggregated for checkerboard partitioning methods (see details and get.evaluation.bins).

kfolds

Number of bins to use in the k-fold random method of data partitioning.

bin.output

logical; If TRUE, appends evaluations metrics for each evaluation bin to results table (i.e., in addition to the average values across bins).

clamp

logical; If TRUE, 'clamping' is used (see Maxent documentation and tutorial for more details).

rasterPreds

logical; If TRUE, the predict function from dismo is used to predict each full model across the extent of the input environmental variables. Note that AICc (and associated values) are NOT calculated if rasterPreds=FALSE because these calculations require the predicted surfaces. However, setting to FALSE can significantly reduce run time.

parallel

logical; If TRUE, parallel processing is used to execute tuning function.

numCores

numeric; indicates the number of cores to use if running in parallel. If parallel=TRUE and this is not specified, the total number of available cores are used.

progbar

logical; used internally.

updateProgress

logical; used internally.

resultsOnly

logical; If TRUE, only results, 'occ.pts', 'bg.pts', 'occ.grp', and 'bg.grp' are returned. The 'predictions' and 'models' slots will be empty. Can be used to optimize allocated RAM memory when 'ENMevaluate' objects are too large. However it will not be possible to check MaxEnt models and predictions.

...

character vector; use this to pass other arguments (e.g., prevalence) to the 'maxent' call. Note that not all options are functional or relevant.

See Also

ENMevaluate

Examples

## Not run: 
ENMeval.res.lst <- ENMevaluate_b(occ.locs, occ.b.env, parallel = T , numCores = 7)

## End(Not run)

HemingNM/ENMwizard documentation built on Jan. 4, 2024, 3:24 p.m.