eval_method: Evaluation of the procedures determining the high-risk zone.

View source: R/evalmethod.R

eval_methodR Documentation

Evaluation of the procedures determining the high-risk zone.

Description

Evaluates the performance of the three methods:

  • Method of fixed radius

  • Quantile-based method

  • Intensity-based method

For further details on the methods, see det_hrz or the paper of Mahling et al. (2013)(References).
There are three ways to simulate data for the evaluation.

Usage

eval_method(
  ppdata,
  type,
  criterion,
  cutoff,
  numit = 100,
  nxprob = 0.1,
  distancemap = NULL,
  intens = NULL,
  covmatrix = NULL,
  simulate,
  radiusClust = NULL,
  clustering = 5,
  pbar = TRUE
)

Arguments

ppdata

Observed spatial point process of class ppp.

type

Method to use, can be one of "dist" (method of fixed radius or quantile-based method), or "intens" (intensity-based method)

criterion

criterion to limit the high-risk zone, can be one of "area" (giving size of hrz), "indirect" (giving quantile/alpha depending on type), or "direct" (giving radius/threshold c depending on type)

cutoff

Value of criterion (area, radius, quantile, alpha or threshold). Depending on criterion and type: If criterion = "direct" and type = "intens", cutoff is the maximum intensity of unexploded bombs outside the risk zone. If type = "dist" instead, cutoff is the radius of the circle around each exploded bomb. "If criterion = "indirect", cutoff is the quantile for the quantile-based method and the failure probability alpha for the intensity-base method. If criterion = "area", cutoff is the area the high-risk zone should have.

numit

Number of iterations

nxprob

Probability of having unobserved events. Default value is 0.1.

distancemap

(optional) distance map: distance of every pixel to the nearest observation of the point pattern; only needed for type="dist". If not given, it will be computed by distmap.

intens

(optional) estimated intensity of the observed process (object of class "im"), only needed for type="intens". If not given, it will be estimated using density.ppp.

covmatrix

(optional) Covariance matrix of the kernel of a normal distribution, only needed for type="intens" if no intensity is given. If not given, it will be estimated using Hscv.

simulate

The type of simulation, can be one of "thinning", "intens" or "clintens"

radiusClust

(Optional) radius of the circles around the parent points in which the cluster points are located. Only used for simulate = "clintens".

clustering

a value >= 1 which describes the amount of clustering; the adjusted estimated intensity of the observed pattern is divided by this value; it is also the parameter of the Poisson distribution for the number of points per cluster. Only used for simulate = "clintens".

pbar

logical. Should progress bar be printed?

Details

The three simulation types are:

Data-based simulation

Here a given data set is used. The data set is thinned as explained below. Note that this method is very different from the others, since it is using the real data.

Simulation of an inhomogeneous Poisson process

Here, an inhomogeneous Poisson process is simulated and then that data is thinned.

Simulation of a Neyman-Scott process

Here a Neyman-Scott process is simulated (see sim_nsppp, rNeymanScott) and this data is then also thinned.

Thinning:
Let X be the spatial point process, which is the location of all events and let Y be a subset of X describing the observed process. The process of unobserved events then is Z = X \ Y , meaning that Z and Y are disjoint and together forming X.
Since Z is not known, in this function an observed or simulated spatial point pattern ppdata is taken as the full pattern (which we denote by X') comprising the observed events Y' as well as the unobserved Z'. Each event in X' is assigned to one of the two processes Y' or Z' by drawing independent Bernoulli random numbers.
The resulting process of observed events Y' is used to determine the high-risk zone. Knowing now the unobserved process, it can be seen how many events are outside and inside the high-risk zone.

type and criterion may be vectors in this function.

Value

A data.frame with variables

Iteration

Iterationstep of the result

Type, Criterion, Cutoff, nxprob

see arguments

threshold

determined threshold. If criterion="area", it is either the distance (if type="dist") or the threshold c (for type="intens"). If criterion="indirect", it is either the quantile of the nearest-neighbour distance which is used as radius (if type="dist") or the threshold c (for type="intens"). If criterion="direct", it equals the cutoff for both types.

calccutoff

determined cutoff-value. For type="dist" and criterion="area", this is the quantile of the nearest-neighbour distance. For type="intens" and criterion="area", it is the failure probability alpha. For all other criterions it is NA.

covmatrix11, covmatrix12, covmatrix21, covmatrix22

values in the covariance matrix. covmatrix11 and covmatrix22 are the diagonal elements (variances).

numbermiss

number of unobserved points outside the high-risk zone

numberunobserved

number of observations in the unobserved point pattern Z'

missingfrac

fraction of unobserved events outside the high-risk zone (numbermiss/numberunobserved)

arearegion

area of the high-risk zone

numberobs

number of observations in the observed point pattern Y'

See Also

det_hrz, rNeymanScott, thin, sim_nsppp, sim_intens

Examples

## Not run:     
 data(craterB)
 
 # the input values are mainly the same as in det_hrz, so for more example ideas, 
 # see the documentation of det_hrz.
 evalm <- eval_method(craterB, type = c("dist", "intens"), criterion = c("area", "area"), 
                      cutoff = c(1500000, 1500000), nxprob = 0.1, numit = 10, 
                      simulate = "clintens", radiusClust = 300, 
                      clustering = 15, pbar = FALSE)
 evalm_d <- subset(evalm, evalm$Type == "dist")
 evalm_i <- subset(evalm, evalm$Type == "intens")
 
 # pout:  fraction of high-risk zones that leave at least one unobserved event uncovered
 # pmiss:  Mean fraction of unobserved events outside the high-risk zone
 data.frame(pmiss_d = mean(evalm_d$missingfrac),
            pmiss_i = mean(evalm_i$missingfrac),
            pout_d = ( sum(evalm_d$numbermiss > 0) / nrow(evalm_d) ), 
            pout_i = ( sum(evalm_i$numbermiss > 0) / nrow(evalm_i) ))

## End(Not run)

highriskzone documentation built on Aug. 29, 2023, 5:10 p.m.