Kmeasure(X, sigma, edge=TRUE, ..., varcov=NULL)
"ppp"
, or data
in any format acceptable to as.ppp()
.varcov
.sigma
."im"
,
see im.object
) whose pixel values are estimates
of the value of the reduced second moment measure for each pixel
(i.e. estimates of the integral of the second moment density
over each pixel).The more familiar K-function $K(t)$ is just the value of the reduced second moment measure for each disc centred at the origin; that is, $K(t) = \kappa(b(0,t))$.
An estimate of $\kappa$ derived from a spatial point pattern dataset can be useful in exploratory data analysis. Its advantage over the K-function is that it is also sensitive to anisotropy and directional effects.
This function computes an estimate of $\kappa$
from a point pattern dataset X
,
which is assumed to be a realisation of a stationary point process,
observed inside a known, bounded window. Marks are ignored.
The algorithm approximates the point pattern and its window by binary pixel
images, introduces a Gaussian smoothing kernel
and uses the Fast Fourier Transform fft
to form a density estimate of $\kappa$. The calculation
corresponds to the edge correction known as the ``translation
correction''.
The Gaussian smoothing kernel may be specified by either of the
arguments sigma
or varcov
. If sigma
is a single
number, this specifies an isotropic Gaussian kernel
with standard deviation sigma
on each coordinate axis.
If sigma
is a vector of two numbers, this specifies a Gaussian
kernel with standard deviation sigma[1]
on the $x$ axis,
standard deviation sigma[2]
on the $y$ axis, and zero
correlation between the $x$ and $y$ axes. If varcov
is
given, this specifies the variance-covariance matrix of the
Gaussian kernel. There do not seem to be any well-established rules
for selecting the smoothing kernel in this context.
The density estimate of $\kappa$
is returned in the form of a real-valued pixel image.
Pixel values are estimates of the
integral of the second moment density over the pixel.
(The uniform Poisson process would have values identically equal to
$a$ where $a$ is the area of a pixel.)
Sums of pixel values over a desired region $A$ are estimates of the
value of $\kappa(A)$. The image x
and y
coordinates are on the same scale as vector displacements in the
original point pattern window. The point x=0, y=0
corresponds
to the `typical point'.
A peak in the image near (0,0)
suggests clustering;
a dip in the image near (0,0)
suggests inhibition;
peaks or dips at other positions suggest possible periodicity.
Stoyan, D. and Stoyan, H. (1994) Fractals, random shapes and point fields: methods of geometrical statistics. John Wiley and Sons.
Kest
,
spatstat.options
,
im.object
data(cells)
image(Kmeasure(cells, 0.05))
# shows pronounced dip around origin consistent with strong inhibition
data(redwood)
image(Kmeasure(redwood, 0.03), col=grey(seq(1,0,length=32)))
# shows peaks at several places, reflecting clustering and ?periodicity
Run the code above in your browser using DataLab