# Habitat Suitability Modeling in R

There are a number of ways to do habitat suitability modeling in R and some packages to support habitat suitabiliy modeling.

**maxent package**

Just to reduce confusion, t he "maxent" package for R is different "maximum entropy" package, does not run Maxent, and is not about habitat suitability.

## dismo

"dismo" stands for "distribution modeling" and contains a number of different species distribution modeling functions including the ability to run Maxent within R. This package was written by some of the top researchers in species distribution modeling (Robert J. Hijmans, Steven Phillips, John Leathwick and Jane Elith). The one drawback with this package is that it requires a large number of other packages and other applications for it to execute correctly.

Some of it's key functions are:

- maxent - runs Maxent within R
- bioclim - runs the simple bioclim model
- calc.deviance - computes deviance from a prediction and occurrances
- Convex Hull - computes a convex hull model around pressence points

## PresenceAbsence

This package contains a large number of functions for evaluating models from presence-absence data. This includes:

- Threshold - optimal threshold
- pcc - Percent correctly classified
- sensitivity - Sensitivity is the proportion of observed positives (presence) correctly predicted, and reflects a model's ability to predict a presence given that a species actually occurs at a location.
- specifificity - Specificity is the proportion of observed negatives (absences) correctly predicted, and reflects a model's ability to predict an absence given that a species actually does not occur at a location
- Kappa - Kappa mea- sures the proportion of correctly classified units after accounting for the probability of chance agreement
- AUC.sp - standard deivation of the AUC

## Sub-launching

Any program, including Maxent, can be "sub-launched" from R using the "System" function. This is similar to calling Maxent from a batch file or command line. The approach is to write out the data files in the format that Maxent expects, calling Maxent from within R, and then reading the output files from Maxent.

## BlueSpray

BlueSpray will call Maxent as if it is a transform that is included in BlueSpray. BlueSpray will also run Maxent repeatedly to evaluate values for regularization, compute AIC values, and even output uncertainty maps. The trade-off is that you lose some flexiblity when it comes to the features of Maxent.