partial_roc | R Documentation |
partial_roc applies partial ROC tests to model predictions.
partial_roc(prediction, test_data, longitude, latitude, error = 5,
iterations = 500, percentage = 50)
prediction |
RasterLayer or numeric vector of ecological niche model predictions to be evaluated. If RasterLayer, layer of predicted suitability. If numeric vector, predicted suitability values. |
test_data |
matrix, data.frame, or numeric vector containing coordinates
of occurrences to test model predictions to be evaluated. If matrix or
data.frame, columns must include longitude and latitude to extract values of
raster prediction. If numeric, values of suitability in such occurrences. If
a matrix or a data.frame is provided, |
longitude |
(character) name of the column with longitude data. |
latitude |
(character) name of the column with latitude data. |
error |
(numeric) value from 0 to 100 to represent the percentage of potential error (E) that the data could have due to any source of uncertainty. Default = 5. |
iterations |
(numeric) number of bootstrap iterations to be performed; default = 500. |
percentage |
(numeric) percentage of testing data to be used in each bootstrapped process for calculating the partial ROC. Default = 50. |
Partial ROC is calculated following Peterson et al. (2008; http://dx.doi.org/10.1016/j.ecolmodel.2007.11.008).
A list with the summary of the results and a data.frame containing the AUC values and AUC ratios calculated for all iterations.
occurrences <- read.csv(system.file("extdata", "occurrences.csv",
package = "ellipsenm"))
prediction <- raster::raster(system.file("extdata", "prediction.tif",
package = "ellipsenm"))
p_roc <- partial_roc(prediction = prediction, test_data = occurrences,
longitude = "Longitude", latitude = "Latitude")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.