Calculate ROC curves using model fits to simulated spatial data
spatialRoc(fit, rr = c(1, 1.2, 1.5, 2), truth, border=NULL,
random = FALSE, prob = NULL, spec = seq(0,1,by=0.01))An array, with dimension 1 being probability threshold, dimension 2
being the relative risk threshold, dimension 3 being sensitivity and specificity.
If fit is a list of model fits, dimension 4 corresponds to elements of fit.
A fitted model from the lgcp function
Vector of relative risks exceedance probabilities will be calculated for. Values
are on the natural scale, with spatialRoc taking logs when appropriate.
True value of the spatial surface, or result from simLgcp function.
Assumed to be on the log scale if random=TRUE and on the natural scale otherwise.
optional, SpatVector specifying region that calculations will be restricted to.
compute ROC's for relative intensity (FALSE) or random effect (TRUE)
Vector of exceedance probabilities
Vector of specificities for the resulting ROC's to be computed for.
Patrick Brown
Fitted models are used to calculate exceedance probabilities, and
a location is judged to be above an rr threshold if this
exceedance probability is above a specified probability threshold.
Each raster cell of the true surface is categorized as being either true positive, false
positive, true negative, and false negative and sensitivity and specificity computed.
ROC curves are produced by varying the probability threshold.
lgcp, simLgcp, excProb