det_hrz_restr: Determination of the high-risk zone.

View source: R/dethrz_restr.R

det_hrz_restrR Documentation

Determination of the high-risk zone.

Description

det_hrz_restr determines the high-risk zone through the method of fixed radius (type = "dist" and criterion = "direct"), the quantile-based method (type = "dist" and criterion = "area"/"indirect") and the intensity-based method (type = "intens"). Restriction areas can be taken into account.

Usage

det_hrz_restr(
  ppdata,
  type,
  criterion,
  cutoff,
  hole = NULL,
  integratehole = TRUE,
  obsprobs = NULL,
  obsprobimage = NULL,
  distancemap = NULL,
  intens = NULL,
  nxprob = 0.1,
  covmatrix = NULL,
  returnintens = 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.

hole

(optional) an object of class owin representing a region inside the observation window of the ppdata where no observations were possible.

integratehole

Should the hole be part of the resulting high-risk zone? Defaults to TRUE.

obsprobs

(optional) Vector of observation probabilities associated with the observations contained in ppdata. Must be given in the same order as the coordinates of the observations. Only meaningful for the intensity-based method if some observations are located in areas where not all events can actually be observed. For example, if only one third of the events in a specific region could be observed, the observation probability of the corresponding observations is 1/3.

obsprobimage

(optional) an object of class im giving the observation probabilities inside the observation window. Ranges of the coordinates must equal those of ppdata. Only used if obsprobs is not given.

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", see density.ppp), only needed for type="intens". If not given, it will be estimated.

nxprob

Probability of having unobserved events. Default value is 0.1.

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.

returnintens

Should the image of the estimated intensity be returned? Defaults to TRUE.

Details

Used in functions eval_method, sim_clintens, sim_intens.
This function contains the same functionalities as det_hrz. In addition, it offers the possibility to take into account so-called restriction areas. This is relevant in situations where the observed point pattern ppdata is incomplete. If it is known that no observations can be made in a certain area (for example because of water expanses), this can be accounted for by integrating a hole in the observation window. The shape and location of the hole is given by hole, whereas integratehole is used to state whether the hole is to become part of the resulting high-risk zone. This may also be a reasonable approach if only few observations could be made in a certain area. Another approach consists in weighting the observed events with their reciprocal observation probability when estimating the intensity. To do so, the observation probability can be specified by using obsprobs (value of the observation probability for each event) or obsprobsimage (image of the observation probability). Note that the observation probability may vary in space.
If there are no restriction areas in the observation window, det_hrz can be used instead.
Note that for criterion = "area", cutoff specifies the area of the high-risk zone outside the hole. If integratehole = TRUE, the area of the resulting high-risk zone will exceed cutoff.

For further information, Mahling et al. (2013) and Mahling (2013), Chapters 4 and 8 and Appendix A (References).

Value

An object of class "highriskzone", which is a list of

typehrz, criterion, cutoff, nxprob

see arguments

zone

Determined high-risk zone: Object of class "owin" based on a binary mask. See owin.

threshold

determined threshold. If type = "dist" and criterion = "direct" it is the specified radius. If criterion = "indirect" or "area" the determined radius used to construct a risk zone fulfilling the specified criterion and cutoff. If type = "dist" it is the specified or calculated threshold c, the maximum intensitiy of unexploded bombs outside the risk zone.

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" or "direct", it is the failure probability alpha. For all other criterions it is NA.

covmatrix

If not given (and type="intens"), it is estimated. See Hscv.

estint

Estimated intensity. See density.ppp.

See Also

distmap, eval.im, owin

Examples

set.seed(1211515)
data(craterA)
#change npixel = 100 to 1000 to get a nicer picture
spatstat.geom::spatstat.options(npixel=100)
# reduce number of observations for faster computation
craterA <- craterA[sample(1:craterA$n, 150)]
# define restriction area
restrwin <- spatstat.geom::owin(xrange=craterA$window$xrange, yrange=craterA$window$yrange,
                           poly=list(x=c(1500, 1500, 2000, 2000), y=c(2000, 1500, 1500, 2000)))

# create image of observation probability (30% inside restriction area)
wim <- spatstat.geom::as.im(craterA$window, value=1)
rim <- spatstat.geom::as.im(restrwin, xy=list(x=wim$xcol, y=wim$yrow))
rim$v[is.na(rim$v)] <- 0
oim1 <- spatstat.geom::eval.im(wim - 0.7 * rim)
# determine high-risk zone by weighting the observations
hrzi1 <- det_hrz_restr(ppdata=craterA, type = "intens", criterion = "indirect",
                       cutoff = 0.4, hole=NULL, obsprobs=NULL, obsprobimage=oim1, nxprob = 0.1)

# determine high-risk zone by accounting for a hole
hrzi2 <- det_hrz_restr(ppdata=craterA, type = "intens", criterion = "indirect",
                       cutoff = 0.4, hole=restrwin, obsprobs=NULL, obsprobimage=NULL, nxprob = 0.1)

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