## S3 method for class 'ppp':
density(x, sigma, \dots, weights, edge=TRUE, varcov=NULL)
"ppp"
) to be smoothed.as.mask
to determine
the pixel resolution.TRUE
, apply edge correction.sigma
."im"
).density
.
A kernel estimate of the intensity function of the point pattern
is computed. The result is
the convolution of the isotropic Gaussian kernel of
standard deviation sigma
with point masses at each of the data
points. The default is to assign
a unit weight to each point.
If weights
is present, the point masses have these
weights (which may be signed real numbers). If 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
.
The arguments sigma
and varcov
are incompatible.
Also 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 as.mask
.
ppp.object
,
im.object
data(cells)
Z <- density.ppp(cells, 0.05)
plot(Z)
Run the code above in your browser using DataLab