Learn R Programming

spatstat.core (version 2.3-1)

thresholdCI: Confidence Interval for Threshold of Numerical Predictor

Description

Given a point pattern and a spatial covariate that has some predictive value for the point pattern, compute a confidence interval for the optimal value of the threshold that should be used to convert the covariate to a binary predictor.

Usage

thresholdCI(X, Z, confidence = 0.95, nsim = 1000, parametric = FALSE)

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.

confidence

Confidence level. A number between 0 and 1.

nsim

Number of bootstrap simulations to perform.

parametric

Logical value specifying whether to use the parametric bootstrap.

Value

A matrix containing upper and lower limits for the threshold z and the corresponding upper and lower limits for the fraction of area of the study region.

Details

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

This code computes a bootstrap confidence interval for the best threshold value \(z\) for converting the numerical predictor to a binary predictor, for use in techniques such as Weights of Evidence.

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

thresholdSelect

Examples

Run this code
# NOT RUN {
  gold <- rescale(murchison$gold, 1000, "km")
  faults <- rescale(murchison$faults, 1000, "km")
  distfault <- distfun(faults)
  thresholdCI(gold, distfault, nsim=100)
# }

Run the code above in your browser using DataLab