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

auc.lpp

Area Under ROC Curve for Data on a Network


Description

Compute the AUC (area under the Receiver Operating Characteristic curve) for a fitted point process model on a linear network.

Usage

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

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

Arguments

X

Point pattern (object of class "ppp" or "lpp") or fitted point process model (object of class "ppm" or "kppm" or "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

This command computes the AUC, the area under the Receiver Operating Characteristic curve. The ROC itself is computed by roc.

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

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

For a point pattern X and a covariate Z, the AUC is a numerical index that measures the ability of the covariate to separate the spatial domain into areas of high and low density of points. Let x[i] be a randomly-chosen data point from X and U a randomly-selected location in the study region. The AUC is the probability that Z(x[i]) > Z(U) assuming high=TRUE. That is, AUC is the probability that a randomly-selected data point has a higher value of the covariate Z than does a randomly-selected spatial location. The AUC is a number between 0 and 1. A value of 0.5 indicates a complete lack of discriminatory power.

For a fitted point process model X, the AUC measures the ability of the fitted model intensity to separate the spatial domain into areas of high and low density of points. Suppose λ(u) is the intensity function of the model. The AUC is the probability that λ(x[i]) > λ(U). That is, AUC is the probability that a randomly-selected data point has higher predicted intensity than does a randomly-selected spatial location. The AUC is not a measure of the goodness-of-fit of the model (Lobo et al, 2007).

Value

Numeric. For auc.lpp, the result is a single number giving the AUC value. For auc.lppm, the result is a numeric vector of length 2 giving the AUC value and the theoretically expected AUC value for this model.

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

auc(spiders, "x")
  fit <- lppm(spiders ~ x + y)
  auc(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.