Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

densityQuick.lpp

Kernel Estimation of Intensity on a Network using a 2D Kernel


Description

Estimates the intensity of a point process on a linear network using a two-dimensional smoothing kernel.

Usage

densityQuick.lpp(X, sigma=NULL, ...,
         kernel="gaussian",
         at = c("pixels", "points"),
         what = c("estimate", "se", "var"),
         leaveoneout = TRUE,
         diggle = FALSE,
         edge2D = FALSE,
         weights = NULL,
         positive = FALSE)

Arguments

X

Point pattern on a linear network (object of class "lpp").

sigma

Smoothing bandwidth. A single numeric value, in the same units as the coordinates of X. Alternatively sigma may be a function which selects a bandwidth when applied to X, for example, bw.scott.iso.

...

Additional arguments passed to as.mask to determine the pixel resolution.

kernel

String (partially matched) specifying the smoothing kernel. Current options are "gaussian", "epanechnikov", "quartic" or "disc".

at

String (partially matched) specifying whether to compute the intensity values at a fine grid of locations on the network (at="pixels", the default) or only at the points of x (at="points").

what

String (partially matched) specifying whether to calculate the intensity estimate, or its estimated standard error, or its estimated variance.

leaveoneout

Logical value indicating whether to compute a leave-one-out estimator. Applicable only when at="points".

diggle

Logical value specifying whether to use the ‘Diggle’ correction.

edge2D

Logical value specifying whether to apply the usual two-dimensional edge correction procedure to the numerator and denominator of the estimate.

weights

Optional weights to be attached to the points. A numeric vector, an expression, or a pixel image.

positive

Logical value indicating whether to force the resulting values to be positive. Default is FALSE for the sake of speed.

Details

Kernel smoothing is applied to the points of x using a two-dimensional Gaussian kernel, as described in Rakshit et al (2019). The result is a pixel image on the linear network (class "linim") which can be plotted.

Other techniques for kernel smoothing on a network are implemented in density.lpp. The main advantages of using a two-dimensional kernel are very fast computation and insensitivity to changes in the network geometry. The main disadvantage is that it ignores the connectivity of the network. See Rakshit et al (2019) for further explanation.

Value

If at="pixels" (the default), a pixel image on the linear network (object of class "linim").

If at="points", a numeric vector with one entry for each point of x.

Infinite bandwidth

If sigma=Inf, the resulting density estimate is constant over all locations, and is equal to the average density of points per unit length. (If the network is not connected, then this rule is applied separately to each connected component of the network).

Author(s)

Adrian Baddeley, Suman Rakshit and Tilman Davies

References

Rakshit, S., Davies, T., Moradi, M., McSwiggan, G., Nair, G., Mateu, J. and Baddeley, A. (2019) Fast kernel smoothing of point patterns on a large network using 2D convolution. International Statistical Review 87 (3) 531–556. DOI: 10.1111/insr.12327.

See Also

density.lpp, the main function for density estimation on a network.

bw.scott, bw.scott.iso for bandwidth selection.

Examples

X <- unmark(chicago)
   plot(densityQuick.lpp(X, 500))
   plot(densityQuick.lpp(X, 500, diggle=TRUE))
   plot(densityQuick.lpp(X, bw.scott.iso))
   plot(densityQuick.lpp(X, 500, what="se"))

spatstat.linnet

Linear Networks Functionality of the 'spatstat' Family

v2.1-1
GPL (>= 2)
Authors
Adrian Baddeley [aut, cre], Rolf Turner [aut], Ege Rubak [aut], Ottmar Cronie [ctb], Tilman Davies [ctb], Greg McSwiggan [ctb], Suman Rakshit [ctb]
Initial release
2021-03-28

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.