binomial_test: Binomial significance test for ecological niche models.

View source: R/binomial_test.R

binomial_testR Documentation

Binomial significance test for ecological niche models.

Description

binomial_test: significance estimation of a niche model by using the cumulative binomial probability of success of predicting correctly an occurrence given the validation data and the proportional area predicted as present in the niche model.

Usage

binomial_test(binary_model, validation_data)

Arguments

binary_model

A binary prediction map of the geographical distribution of a species.

validation_data

A numerical matrix or data.frame containing coordinates of the occurrences used to test the model to be evaluated; columns must be: longitude and latitude.

Details

According to Anderson et al,(2003) The test is "employed to determine whether test points fall into regions of predicted presence more often than expected by chance, given the proportion of map pixels predicted present by the model". See Anderson,R.P. et al. (2003) Evaluating predictive models of species’ distributions: Criteria for selecting optimal models. Ecol. Model., 162, 211–232.

Value

A data.frame with 6 columns: (i) npixels_in_pred (numbre of pixeles in the prediction), (ii) npixels_pp (numbre of pixeles predicted as presences), (iii) prop_area_pp (proportional area predicted as presences), (iv) n_success (number of presences correctly predicted as presences), (v) n_fails (number of presences predicted as absences), and (vi) p_value (a value between 0-1 representing statistical significance of the niche model).

Examples

binary_model <- raster::raster(file.path(system.file("extdata",
                                                     package = "ntbox"),
                                                     "binary_ixodes.tif"))
validation_data <- utils::read.csv(file.path(system.file("extdata",
                                                     package = "ntbox"),
                                                     "I_scapularis_eval.csv"))
binomial_test(binary_model, validation_data)

luismurao/ntbox documentation built on May 9, 2024, 8:24 p.m.