Skip to contents

With the isotropic Gaussian kernel of standard deviation \(\sigma\) and the edge mass \(e(u)\) (the share of the kernel centred at u inside the rectangular window, a product of normal CDF differences): "none" gives \(\sum_j w_j k(u - x_j)\), "uniform" divides by \(e(u)\) (Diggle 1985) and "diggle" divides each term by \(e(x_j)\) (Jones 1993). Evaluated at the data points (at = NULL, leaving each point out of its own sum by default) or at given locations; these are spatstat.explore::density.ppp with at = "points" and its edge and diggle options.

Usage

KernelIntensity(
  points,
  window,
  sigma,
  at = NULL,
  correction = c("uniform", "none", "diggle"),
  leaveoneout = TRUE,
  weights = NULL
)

Arguments

points

Event locations (n x 2) inside window.

window

Rectangle c(xmin, xmax, ymin, ymax).

sigma

Kernel standard deviation.

at

Optional (m x 2) evaluation locations.

correction

"none", "uniform" or "diggle".

leaveoneout

At the data points, omit each point's own kernel.

weights

Optional point weights.

Value

List with intensity, edge, correction, sigma.

References

Diggle, P. J. (1985). A kernel method for smoothing point process data. Applied Statistics 34, 138-147.

Jones, M. C. (1993). Simple boundary correction for kernel density estimation. Statistics and Computing 3, 135-146.

Examples

KernelIntensity(rbind(c(0.2, 0.3), c(0.4, 0.5), c(0.7, 0.2)), c(0, 1, 0, 1), 0.2)$intensity
#> [1] 2.0614085 1.9538858 0.7308439