Learn R Programming

BiodiversityR (version 2.0)

evaluation.strip.data: Evaluation strips for ensemble suitability mapping

Description

These functions provide a dataframe which can subsequently be used to evaluate the relationship between environmental variables and the fitted probability of occurrence of individual or ensemble suitability modelling algorithms. The biomod2 package provides an alternative implementation of this approach (response.plot2).

Usage

evaluation.strip.data(x, ext = NULL, vars=names(x), factors = NULL, steps = 50, 
    modelnames = c("MAXENT", "GBM", "GBMSTEP", "RF", "GLM", "GLMSTEP", "GAM", "GAMSTEP", "MGCV", 
    "EARTH", "RPART", "NNET", "FDA", "SVM", "BIOCLIM", "DOMAIN", "MAHAL"))

evaluation.strip.plot(data, modelnames = c("MAXENT", "GBM", "GBMSTEP", "RF", "GLM", "GLMSTEP", "GAM", "GAMSTEP", "MGCV", "EARTH", "RPART", "NNET", "FDA", "SVM",
    "BIOCLIM", "DOMAIN", "MAHAL"), variable = NULL, model = NULL, ...)

Arguments

x
RasterStack object (stack) containing all layers that correspond to explanatory variables used for suitability modelling
ext
an Extent object to crop the area of interest to a sub-region of x, typically provided as c(lonmin, lonmax, latmin, latmax); see also crop and exte
vars
Vector that indicates which variables should be included as columns in the data frame. Only variables that correspond to layers of the rasterStack will be included.
factors
vector that indicates which variables are factors; see also prepareData
steps
number of steps within the range of a continuous explanatory variable
modelnames
abbreviated names of the individual suitability models that are fitted. Should correspond to the names used in ensemble.grd.
data
data set with ranges of environmental variables and fitted suitability models, typically returned by ensemble.grd
variable
focal explanatory variable for plots with evaluation strips
model
focal explanatory variable for plots with evaluation strips
...
Other arguments passed to plot

Value

  • function evaluation.strip.data creates a data frame, function code{evaluation.strip.data} allows for plotting.

Details

These functions are mainly intended to be used internally by the ensemble.raster function. evaluation.strip.data creates a data frame with variables (columns) corresponding to the environmental variables encountered in the RasterStack object (x) and the suitability modelling approaches that were defined. The variable of focal.var is an index of the variable for which values are ranged. The variable of categorical is an index for categorical (factor) variables. A continuous (numeric) variable is ranged between its minimum and maximum values in the number of steps defined by argument steps. When a continuous variable is not the focal variable, then the average (mean) is used. A categorical (factor) variable is ranged for all the encountered levels (levels) for this variable. When a categorical variable is not the focal variable, then the most frequent level is used.

References

Elith J, Ferrier S, Huettmann F & Leathwick J. 2005. The evaluation strip: A new and robust method for plotting predicted responses from species distribution models. Ecological Modelling 186: 280-289

See Also

ensemble.raster

Examples

Run this code
# get predictor variables
library(dismo)
predictors <- stack(list.files(path=paste(system.file(package="dismo"), '/ex', sep=''), pattern='grd', full.names=TRUE ))
names(predictors)

# create data set with ranges of explanatory variables
new.data <- evaluation.strip.data(predictors, factors="biome")
summary(new.data[new.data[,"focal.var"]==1,])

Run the code above in your browser using DataLab