- model
a binary-response model object of class "glm", "gam", "gbm", "randomForest" or "bart". If this argument is provided, 'obs' and 'pred' will be extracted with mod2obspred
. Alternatively, you can input the 'obs' and 'pred' arguments instead of 'model'.
- obs
alternatively to 'model' and together with 'pred', a numeric vector of observed presences (1) and absences (0) of a binary response variable. Alternatively (and if 'pred' is a 'SpatRaster'), a two-column matrix or data frame containing, respectively, the x (longitude) and y (latitude) coordinates of the presence points, in which case the 'obs' vector will be extracted with ptsrast2obspred
. This argument is ignored if 'model' is provided.
- pred
alternatively to 'model' and together with 'obs', a vector with the corresponding predicted values of presence probability, habitat suitability, environmental favourability or alike. Must be of the same length and in the same order as 'obs'. Alternatively (and if 'obs' is a set of point coordinates), a 'SpatRaster' map of the predicted values for the entire evaluation region, in which case the 'pred' vector will be extracted with ptsrast2obspred
. This argument is ignored if 'model' is provided.
- thresh
numeric threshold value within the limits of 'pred', or a criterion under which to compute the threshold -- run modEvAmethods("getThreshold") for available options, and see Details in getThreshold
for their description.
- right
logical value indicating if the interval should be closed on the right (and open on the left) or vice versa, i.e., if the threshold value itself should be classified as 0 rather than 1. The default is FALSE.
- interval
Argument to pass to optiThresh
indicating the interval between the thresholds to test, if 'thresh' implies optimizing a threshold-based measure. The default is 0.01. Smaller values may provide more precise results but take longer to compute.
- quant
Numeric value indicating the proportion of presences to discard if thresh="MTP" (minimum training presence). With the default value 0, MTP will be the threshold at which all observed presences are classified as such; with e.g. quant=0.05, MTP will be the threshold at which 5% presences will be classified as absences.
- na.rm
Logical value indicating whether NA values should be ignored. Defaults to TRUE.