Tools for training, selecting, and evaluating maximum entropy (and standard logistic regression) distribution models. This package provides tools for user-controlled transformation of explanatory variables, selection of variables by nested model comparison, and flexible model evaluation and projection. It follows principles based on the maximum- likelihood interpretation of maximum entropy modeling, and uses infinitely- weighted logistic regression for model fitting.

Tools for training, selecting, and evaluating maximum entropy (and standard logistic regression) distribution models. This package provides tools for user-controlled transformation of explanatory variables, selection of variables by nested model comparison, and flexible model evaluation and projection. It follows principles based on the maximum-likelihood interpretation of maximum entropy modeling (Halvorsen et al., 2015), and uses infinitely-weighted logistic regression for model fitting. (Fithian & Hastie, 2013).

**MIAmaxent** is intended primarily for maximum entropy distribution
modeling (Phillips et al., 2006; Phillips et al., 2017), but provides an
alternative to the standard methodology for training, selecting, and
using models. The major advantage in this alternative methodology is
greater user control – in variable transformations, in variable
selection, and in model output. Comparisons also suggest that this
methodology results in simpler models with equally good predictive
ability, and reduces the risk of overfitting (Halvorsen et al., 2016).

The predecessor to this package is the MIA Toolbox, which is described in detail in Mazzoni et al. (2015).

Install the release version from CRAN:

install.packages("MIAmaxent")

Or the development version from github:

# install.packages('devtools')devtools::install_github("julienvollering/MIAmaxent", build_vignettes = TRUE)

This diagram outlines a common workflow for users of this package. Functions are shown in red.

Fithian, W., & Hastie, T. (2013). Finite-sample equivalence in statistical models for presence-only data. The annals of applied statistics, 7(4), 1917.

Halvorsen, R., Mazzoni, S., Bryn, A. & Bakkestuen, V. (2015) Opportunities for improved distribution modelling practice via a strict maximum likelihood interpretation of MaxEnt. Ecography, 38, 172-183.

Halvorsen, R., Mazzoni, S., Dirksen, J.W., Næsset, E., Gobakken, T. & Ohlson, M. (2016) How important are choice of model selection method and spatial autocorrelation of presence data for distribution modelling by MaxEnt? Ecological Modelling, 328, 108-118.

Mazzoni, S., Halvorsen, R. & Bakkestuen, V. (2015) MIAT: Modular R-wrappers for flexible implementation of MaxEnt distribution modelling. Ecological Informatics, 30, 215-221.

Phillips, S.J., Anderson, R.P., Dudík, M., Schapire, R.E., & Blair, M.E. (2017). Opening the black box: an open‐source release of Maxent. Ecography, 40(7), 887-893.

Phillips, S.J., Anderson, R.P. & Schapire, R.E. (2006) Maximum entropy modeling of species geographic distributions. Ecological Modelling, 190, 231-259.

- Model fitting implemented as infinitely-weighted logistic regression, so that all computation can be done natively in R (maxent.jar no longer required).
- Implements choice of algorithm: "maxent" for maximum entropy or "LR" for standard logistic regression (binomial GLM).
- No files written to system unless write = TRUE
- Choice of Chi-squared or F-test in nested model comparison
- More consistency in arguments across top-level functions
- Selection trail tables simplified and clarified

- increased flexibility in graphics arguments passed to plotting functions
- quiet option added to top-level functions performing selection
- readData() automatically removes duplicates when two or more presences/absences fall in the same cell
- readData() discards presence locations with missing EV data
- formula argument to selectEV() function, to specifiy starting point for selection
- plotFOP() smoother changed to loess from exponentially weighted moving average
- plotFOP() plots data density behind FOP values
- plotFOP() returns plot data invisibly
- plotResp() and plotResp2() take identical arguments, the first of which is a model object
- projectModel() takes data in data.frame or raster classes, and plots output spatially in the case of the latter
- trainmax argument removed from selectDVforEV() and selectEV()
- testAUC() plotting optional

- Model ranking within selection rounds based on p-value and then F-statistic (tiebreaker), rather than simply F-statistic
- Directories specified by 'dir' argument are created if they do not already exist.
- Existing results in directories specified by 'dir' argument are overwritten, if desired.
- Fixed bug in selectEV that occurred when the last round of model selection before interaction terms did not result in a significant variable.
- Unnecessary dependency on Hmisc removed.

- Removed version minimums for dependencies which are default packages, to allow r-oldrel binary.
- Changed names of toy data used in examples for better organization.

- First public release.