Learn R Programming

spatstat.model (version 3.4-0)

auc.ppm: Area Under ROC Curve

Description

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

Usage

# S3 method for ppm
auc(X, ..., subset=NULL)

# S3 method for kppm auc(X, ..., subset=NULL)

# S3 method for slrm auc(X, ..., subset=NULL)

Value

Numeric vector of length 2 giving the AUC value and the theoretically expected AUC value for this model.

Arguments

X

Fitted point process model (object of class "ppm" or "kppm" or "lppm") or fitted spatial logistic regression model (object of class "slrm").

...

Arguments passed to roc.ppm, and arguments passed to as.mask controlling the pixel resolution for calculations,

subset

Optional. A spatial window (object of class "owin") specifying a subset of the data, for which the AUC should be calculated.

Author

Adrian Baddeley Adrian.Baddeley@curtin.edu.au, Ege Rubak rubak@math.aau.dk and Suman Rakshit Suman.Rakshit@curtin.edu.au.

Details

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

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 \(\lambda(u)\) is the intensity function of the model. The AUC is the probability that \(\lambda(x_i) > \lambda(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).

(For spatial logistic regression models (class "slrm") replace “intensity” by “probability of presence” in the text above.)

The algorithm also calculates the theoretically expected AUC value for this model, as described in Baddeley et al (2025).

References

Baddeley, A., Rubak, E., Rakshit, S. and Nair, G. (2025) ROC curves for spatial point patterns and presence-absence data. tools:::Rd_expr_doi("10.48550/arXiv.2506.03414")..

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

roc, roc.ppm, youden.

Examples

Run this code
  fit <- ppm(swedishpines ~ x+y)
  auc(fit)
  auc(swedishpines, "x")

Run the code above in your browser using DataLab