wGARP: Calculates the Wilcoxon test statistic

Description Usage Arguments Details Value See Also Examples

View source: R/wGARP.R

Description

wGARP Returns the Wilcoxon test statistic of the best model subset output from GARP. When using discrete values, such as the number of models agreeing on predicted presence location, the Wilcoxon test statistic equates the AUC.

Usage

1
wGARP(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 DesktopGARP for model training and those output by splitData.

Value

Returns the Wilcoxon test statistic.

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))
  wGARP(n = 10, x = r, points = SpatialPoints(hs[,1:2]))

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