Learn R Programming

spatstat.explore (version 3.0-6)

thresholdSelect: Select Threshold to Convert Numerical Predictor to Binary Predictor

Description

Given a point pattern and a spatial covariate that has some predictive value for the point pattern, determine the optimal value of the threshold for converting the covariate to a binary predictor.

Usage

thresholdSelect(X, Z, method = c("Y", "LL", "AR", "t", "C"), Zname)

Value

A numerical value giving the selected threshold. The result also belongs to the class "bw.optim"

which can be plotted (the plot shows the criterion used to select the threshold).

Arguments

X

Point pattern (object of class "ppp").

Z

Spatial covariate with numerical values. Either a pixel image (object of class "im"), a distance function (object of class "distfun") or a function(x,y) in the R language.

method

Character string (partially matched) specifying the method to be used to select the optimal threshold value. See Details.

Zname

Optional character string giving a short name for the covariate.

Author

Adrian Baddeley Adrian.Baddeley@curtin.edu.au.

Details

The spatial covariate Z is assumed to have some utility as a predictor of the point pattern X.

This code chooses the best threshold value \(v\) for converting the numerical predictor Z to a binary predictor, for use in techniques such as Weights of Evidence.

The best threshold is selected by maximising the criterion specified by the argument method. Options are:

  • method="Y" (the default): the Youden criterion

  • method="LL": log-likelihood

  • method="AR": the Akman-Raftery criterion

  • method="t": the Studentised Weights-of-Evidence contrast

  • method="C": the Weights-of-Evidence contrast

These criteria are explained in Baddeley et al (2021).

References

Baddeley, A., Brown, W., Milne, R.K., Nair, G., Rakshit, S., Lawrence, T., Phatak, A. and Fu, S.C. (2021) Optimal thresholding of predictors in mineral prospectivity analysis. Natural Resources Research 30 923--969.

See Also

thresholdCI

Examples

Run this code
  gold <- rescale(murchison$gold, 1000, "km")
  faults <- rescale(murchison$faults, 1000, "km")
  distfault <- distfun(faults)
  z <- thresholdSelect(gold, distfault)
  z
  plot(z, xlim=c(0, 20))

Run the code above in your browser using DataLab