Computes the omission rate value of a model given a threshold

omission_rate(model, threshold, occ_train, occ_test)

Arguments

model

Ecological niche model in raster format.

threshold

A numeric vector with the thresholds that will be used to compute the omission rates.

occ_train

Train data with three columns: "sp_name", "longitude" and "latitude"

occ_test

Test data with three columns: "sp_name", "longitude" and "latitude"

Value

Returns a data.frame with the threshold value and the omission rate.

Examples

if (FALSE) { # Occurrence data for the giant hummingbird (Patagona gigas) pg <- utils::read.csv(system.file("extdata/p_gigas.csv", package = "ntbox")) # Split occs in train and test pgL <- base::split(pg,pg$type) pg_train <- pgL$train[,-4] pg_test <- pgL$test[,-4] mod_path <- file.path(system.file("extdata", package = "ntbox"), "p_gigas.tif") model <- raster::raster(mod_path) thresholds <- seq(0.01, 0.1,by = 0.03) omrs <- omission_rate(model = model, threshold = thresholds, occ_train = pg_train, occ_test = pg_test) print(omrs) }