Learn R Programming

ENMeval version 2.0.5

R package for automated tuning and evaluations of ecological niche models

ENMeval is an R package that performs automated tuning and evaluations of ecological niche models / species distribution models. These models make predictions of species' niche relationships and potential geographic distributions based on presence data, environmental predictor variables, and a sample of available environmental conditions (i.e., background data).

"Model tuning" is commonly used for machine-learning models. It means building candidate models with a range of complexity settings, evaluating the accuracy of each one (here with cross-validation), then selecting optimal settings for your data based on those of the best-performing model. This exercise is important because it is difficult to predict in advance how complex your model needs to be to make accurate and ecologically realistic predictions for your species. Too much model complexity leads to overfitting, where your model fits your data very well but it cannot predict new data accurately. Model tuning helps maximize predictive ability while avoiding model overfitting.

The ENMeval package features a single function that performs model tuning based on user specifications, including methods for partitioning data for cross-validation (random, leave-one-out, spatial, custom), and evaluates models using predefined performance metrics (AUC, Continuous Boyce Index, omission rates) with the option to insert others. The package includes functionality for three models: maxent.jar (Java implementation of Maxent), maxnet (R implementation of Maxent), and BIOCLIM (climate envelope method). Users can also specify other algorithms by customizing an ENMdetails object (?ENMdetails). The package also offers comprehensive metadata output, null model evaluations, visualization tools, and an extensive tutorial that walks you through a full analysis workflow. Many features in ENMeval were created in response to user requests -- thank you for your input! Version >=2.0.0 represents an extensive restructure and expansion of previous versions, and 2.0.5 is a big move from raster and dismo functions to those of terra and predicts.

For a more detailed description of ENMeval, please reference the most recent publication:

Kass, J. M., Muscarella, R., Galante, P. J., Bohl, C., Pinilla-Buitrago, G. E., Boria, R. A., Soley-Guardia, M., & Anderson, R. P. (2021). ENMeval 2.0: redesigned for customizable and reproducible modeling of species’ niches and distributions. Methods in Ecology and Evolution, 12: 1602-1608.

For the original package version, please reference this older publication:

Muscarella, R., Galante, P. J., Soley-Guardia, M., Boria, R. A., Kass, J. M., Uriarte, M. and Anderson, R. P. (2014), ENMeval: An R package for conducting spatially independent evaluations and estimating optimal model complexity for Maxent ecological niche models. Methods in Ecology and Evolution, 5: 1198–1205.

NOTES:

  1. ENMeval is a work in progress, changing slowly to fix bugs when users identify them. If you find a bug, please raise an Issue in this Github repo and I will resolve it as soon as I can. The CRAN version may lag behind the Github one, so please try the development version here first if you are having any issues.

Install with: devtools::install_github("jamiemkass/ENMeval")

  1. The vignette is not included in the CRAN version of the package due to file size constraints, but is available on the package's Github Pages website.

  2. Please make sure to use the most recent version of maxent.jar, as bug fixes are occasionally made.

  3. Note that as of version 0.3.0, the default implementation uses the 'maxnet' R package. The output from this differs from that of the original Java program and so some features are not compatible (e.g., variable importance, html output).

Copy Link

Version

Install

install.packages('ENMeval')

Monthly Downloads

4,411

Version

2.0.5

License

GPL-3

Maintainer

Jamie M. Kass

Last Published

February 11th, 2025

Functions in ENMeval (2.0.5)

enm.ncoefs

enm.ncoefs generic for ENMdetails object
calc.niche.overlap

Calculate Similarity of ENMs in Geographic Space
enm.errors

enm.errors generic for ENMdetails object
emp.bg

emp.bg generic for ENMnull object
emp.bg.grp

emp.bg.grp generic for ENMnull object
enm.fun

enm.fun generic for ENMdetails object
enm.maxent.jar

ENMdetails maxent.jar
enm.msgs

enm.msgs generic for ENMdetails object
eval.occs

eval.occs generic for ENMevaluation object
enm.predict

enm.predict generic for ENMdetails object
eval.occs.grp

eval.occs.grp generic for ENMevaluation object
eval.variable.importance

eval.variable.importance (variable importance) generic for ENMevaluation object
eval.tune.settings

eval.tune.settings generic for ENMevaluation object
emp.occs

emp.occs generic for ENMnull object
eval.models

eval.models generic for ENMevaluation object
enm.variable.importance

enm.variable.importance generic for ENMdetails object
eval.doClamp

eval.doClamp generic for ENMevaluation object
emp.occs.grp

emp.occs.grp generic for ENMnull object
eval.overlap

eval.overlap generic for ENMevaluation object
enmeval_results

Example ENMevaluation object.
clamp.vars

Clamp predictor variables
eval.partition.method

eval.partition.method generic for ENMevaluation object
eval.algorithm

eval.algorithm generic for ENMevaluation object
eval.occs.testing

eval.occs.testing generic for ENMevaluation object
enm.maxnet

ENMdetails maxnet
corrected.var

Corrected variance function
eval.bg

eval.bg generic for ENMevaluation object
enm.name

eval.name generic for ENMdetails object
null.emp.results

null.emp.results generic for ENMnull object
lookup.enm

Look up ENMdetails abject
maxentJARversion

Look up version of maxent.jar
null.doClamp

null.doClamp generic for ENMnull object
eval.taxon.name

eval.taxon.name generic for ENMevaluation object
eval.other.settings

eval.other.settings generic for ENMevaluation object
null.other.settings

null.other.settings generic for ENMnull object
evalplot.envSim.map

Similarity maps for partition groups
eval.rmm

eval.rmm generic for ENMevaluation object
evalplot.envSim.hist

Similarity histogram plots for partition groups
eval.clamp.directions

eval.clamp.directions generic for ENMevaluation object
eval.bg.grp

eval.bg.grp generic for ENMevaluation object
eval.partition.settings

eval.partition.settings generic for ENMevaluation object
evalplot.nulls

ENMnulls statistics plot
null.partition.method

null.partition.method generic for ENMnull object
evalplot.grps

Partition group plots
eval.predictions

eval.predictions generic for ENMevaluation object
saveENMevaluation

Save ENMevaluation object
tune.enm

Iterate tuning of ENMs
null.mod.settings

null.mod.settings generic for ENMnull object
maxnet.predictRaster

Predict raster for maxnet
null.algorithm

null.algorithm generic for ENMnull object
null.results.partitions

null.results.partitions generic for ENMnull object
parse_lambdas

Parse Maxent lambdas information
evalplot.stats

ENMevaluation statistics plot
null.partition.settings

null.partition.settings generic for ENMnull object
eval.results.partitions

eval.results.partitions generic for ENMevaluation object
eval.results

eval.results generic for ENMevaluation object
loadENMevaluation

Load ENMevaluation object
null.no.iter

null.no.iter generic for ENMnull object
null.results

null.results generic for ENMnull object
plot.sim.dataPrep

Internal plotting function
partitions

Methods to partition data for evaluation
ENMevaluate

Tune ecological niche model (ENM) settings and calculate evaluation statistics
ENMevaluation_convert

Convert old ENMevaluation objects to new ones
ENMdetails-class

ENMdetails class
enm.args

enm.args generic for ENMdetails object
calc.10p.trainThresh

Calculate 10 percentile threshold
buildRMM

Build metadata object from ENMeval results
aic.maxent

Calculate AICc from Maxent model prediction
ENMevaluation-class

ENMevaluation class
bvariegatus

Example occurrence dataset.
ENMnull-class

ENMnull class
ENMnulls

Generate null ecological niche models (ENMs) and compare null with empirical performance metrics
ENMeval-package

Automated runs and evaluations of ecological niche models
enm.bioclim

ENMdetails bioclim