Kernel Smoothed Intensity of Point Pattern
Compute a kernel smoothed intensity function from a point pattern.
## S3 method for class 'ppp': density(x, sigma, \dots, weights, edge=TRUE, varcov=NULL)
- Point pattern (object of class
"ppp") to be smoothed.
- Standard deviation of isotropic Gaussian smoothing kernel.
- Optional vector of weights to be attached to the points. May include negative values.
- Arguments passed to
as.maskto determine the pixel resolution.
- Logical flag: if
TRUE, apply edge correction.
- Variance-covariance matrix of anisotropic Gaussian kernel.
This is a method for the generic function
A kernel estimate of the intensity function of the point pattern
is computed (Diggle, 1985). The result is
the convolution of the isotropic Gaussian kernel of
sigma with point masses at each of the data
points. The default is to assign
a unit weight to each point.
weights is present, the point masses have these
weights (which may be signed real numbers).
edge=TRUE, the intensity estimate is corrected for
edge effect bias by dividing it by the convolution of the
Gaussian kernel with the window of observation.
Instead of the isotropic Gaussian kernel with standard deviation
sigma, the smoothing kernel may be chosen to be any Gaussian
kernel, by giving the variance-covariance matrix
varcov are incompatible.
sigma may be a vector of length 2 giving the
standard deviations of two independent Gaussian coordinates,
thus equivalent to
varcov = diag(sigma^2).
Computation is performed using the Fast Fourier Transform.
Accuracy depends on the pixel resolution, controlled by the arguments
... passed to
To perform spatial interpolation of values that were observed
at the points of a point pattern, use
- A pixel image (object of class
The result of
density.ppp is not a probability density!
It is an estimate of the intensity function of the
underlying point process. The integral of this function over the
window is not equal to 1; it equals the expected number of points
falling in the window.
Diggle, P.J. (1985) A kernel method for smoothing point process data. Applied Statistics (Journal of the Royal Statistical Society, Series C) 34 (1985) 138--147.
Diggle, P.J. (2003) Statistical analysis of spatial point patterns, Second edition. Arnold.
data(cells) Z <- density.ppp(cells, 0.05) plot(Z)