Learn R Programming

ENiRG (version 1.0.1)

boyce: Habitat suitability classification using continuous Boyce index (CBI).

Description

boyce.classification function aims to investigate accuracy of the map obtained from function enirg.predict, by using the continuous Boyce index (CBI; Boyce et al., 2002).

Curves from P/E ratio give the possibility to reclassify the predicted niche map (enirg.predict) and thus distinguish unsuitable, marginal, suitable and optimal habitats. In accordance with the method proposed by Hirzel et al.(2006), it interprets predicted-to-expected ratio (P/E) by partitioning habitat suitability predictions into classes and by calculating frequencies. If model properly delineates suitable areas for the studied species, Spearman rank correlation coefficient of the ratio $F_i$, will be 1.

Evaluation of habitat suitability model accuracy is made by means of n-fold cross-validation (Fielding and Bell, 1997), partitioning data evenly but randomly into cv.sets partitions. Once ratio is calculated, Spearman correlation coefficient allows to estimate fitting for the predicted-to-expected relationship.

Categories allows to use function classify.map, in order to perform a classification on the HSM (enirg.predict).

Usage

boyce(prediction, prediction.map, categories = NULL, cv.sets = 10, type = "manual", outcat = "cbi.results")

Arguments

prediction
vector. Predicted suitability values from observations or from a second validation data set.
prediction.map
vector. Predicted suitability values for the entire area of study.
categories
vector with desired categories. NULL if type = "manual"
cv.sets
integer, indicating the number of subsets to use for the cross validation.
type
string. If "manual", a GUI assists the classification process. If "none", categories parameter will be used.
outcat
string. Name for object which will contain the results.

Value

This function displays predicted/expected ratio curve shapes. Also enirg.predict returns a list object, containing the following components:
  • coefficients. A vector of two: spearman rank coefficient and adjusted r squared.
  • intervals. Suitability intervals for later using with classify.map

Details

A GUI allows a manual adjustment of suitability classes. An ideal model would give a straight P/E curve. Curve shape and its confidence interval can be used to define boundaries of habitat suitability classes (as suggested by vertical dashed lines).

References

Boyce, M.S.,Vernier, P.R.,Nielsen,S.E.,Schmiegelow, F.K.A. (2002). Evaluating resource selection functions. Ecological Modelling 157, 281-300.

Fielding, A., Bell, J. (1997). A review of methods for the assessment of prediction errors in conservation presence/absence models. Environmental Conservation, 24, 38-49.

Hirzel, A.H., Le Lay, G., Helfer, V., Randin, C., Guisan, A. (2006). Evaluating the ability of the habitat suitability models to predict species presences. Ecological Modelling 199, 142-152.

See Also

enirg.predict, predict.enfa

Examples

Run this code
data(apis.hsm)

# vector of predictions for observations:
apis.predictions <- apis.hsm$predictions[, 2]

# vector of predictions for the entire predicted map:
apis.predictions.map <- as.vector(na.exclude(apis.hsm$African_predicted_hsm@data@values))

# Try with intervals:
# unsuitable = 0.65
# marginal = 0.84
# suitable = 0.96
# Note that this species has an optimal distribution
# in the study area, resulting in a wide unsuitable
# interval and narrow suitable ones.

boyce(prediction = apis.predictions,
      prediction.map = apis.predictions.map,
      categories = c(0, 0.65, 0.84, 0.96, 1),
      cv.sets = 10, type = "none")

Run the code above in your browser using DataLab