Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

roc.lpp

Receiver Operating Characteristic for Data on a Network


Description

Computes the Receiver Operating Characteristic curve for a point pattern or a fitted point process model on a linear network.

Usage

## S3 method for class 'lpp'
roc(X, covariate, ..., high = TRUE)

## S3 method for class 'lppm'
roc(X, ...)

Arguments

X

Point pattern on a network (object of class "lpp") or fitted point process model on a network (object of class "lppm").

covariate

Spatial covariate. Either a function(x,y), a pixel image (object of class "im" or "linim"), or one of the strings "x" or "y" indicating the Cartesian coordinates.

...

Arguments passed to as.mask controlling the pixel resolution for calculations.

high

Logical value indicating whether the threshold operation should favour high or low values of the covariate.

Details

The command roc computes the Receiver Operating Characteristic curve. The area under the ROC is computed by auc.

The function roc is generic, with methods for "ppp" and "ppm" described in the help file for roc.

This help file describes the methods for classes "lpp" and "lppm".

For a point pattern X and a covariate Z, the ROC is a plot showing the ability of the covariate to separate the spatial domain into areas of high and low density of points. For each possible threshold z, the algorithm calculates the fraction a(z) of area in the study region where the covariate takes a value greater than z, and the fraction b(z) of data points for which the covariate value is greater than z. The ROC is a plot of b(z) against a(z) for all thresholds z.

For a fitted point process model, the ROC shows the ability of the fitted model intensity to separate the spatial domain into areas of high and low density of points. The ROC is not a diagnostic for the goodness-of-fit of the model (Lobo et al, 2007).

Value

Function value table (object of class "fv") which can be plotted to show the ROC curve.

Author(s)

Adrian Baddeley Adrian.Baddeley@curtin.edu.au, Rolf Turner r.turner@auckland.ac.nz and Ege Rubak rubak@math.aau.dk.

References

Lobo, J.M., Jimenez-Valverde, A. and Real, R. (2007) AUC: a misleading measure of the performance of predictive distribution models. Global Ecology and Biogeography 17(2) 145–151.

Nam, B.-H. and D'Agostino, R. (2002) Discrimination index, the area under the ROC curve. Pages 267–279 in Huber-Carol, C., Balakrishnan, N., Nikulin, M.S. and Mesbah, M., Goodness-of-fit tests and model validity, Birkhauser, Basel.

See Also

Examples

plot(roc(spiders, "x"))
  fit <- lppm(spiders ~ x)
  plot(roc(fit))

spatstat.linnet

Linear Networks Functionality of the 'spatstat' Family

v2.1-1
GPL (>= 2)
Authors
Adrian Baddeley [aut, cre], Rolf Turner [aut], Ege Rubak [aut], Ottmar Cronie [ctb], Tilman Davies [ctb], Greg McSwiggan [ctb], Suman Rakshit [ctb]
Initial release
2021-03-28

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.