plotROC: Plots the Receiver Operating Charactersitic (ROC) Curve

Description Usage Arguments Details Value See Also Examples

View source: R/plotROC.R

Description

plotROC Plots the ROC curve of the best model subset output from GARP, relating 1-model specificity to model sensitivity

Usage

1
plotROC(n, x, points)

Arguments

n

a numeric value specifying the number of models in the best subset output from GARP

x

a raster object of the summated raster of the best models output from GARP

points

a spatial object of presence data to use for testing locations

Details

For discrete cutpoints (n), represents the number of models that agree on a predicted presence location.

The raster object (x) should be a raster representing the number of models that agree on a predicted presence location per pixel and that outtput by sumRasters.

The shapefile points should presence locations that were not used by GARP for model training and those output by splitData.

Value

A plot of the ROC curve.

See Also

aucGARP

Examples

1
2
3
4
5
6
  set.seed(0)
  library(raster)
  r   <- raster(ncols = 100, nrows = 100)
  r[] <- rbinom(5, 10, 0.3)
  hs  <- data.frame("Latitude" = c(-89, 72, 63, 42, 54), "Longitude" = c(-12, 13, 24, 26, 87), "Species" = rep("Homo_sapiens", 5))
  plotROC(n = 10, x = r, points = SpatialPoints(hs[,1:2]))

cghaase/GARPTools documentation built on Aug. 6, 2021, 6:38 a.m.