
Last chance! 50% off unlimited learning
Sale ends in
Estimates the reduced second moment measure
Kmeasure(X, sigma, edge=TRUE, …, varcov=NULL)
The observed point pattern,
from which an estimate of "ppp"
, or data
in any format acceptable to as.ppp()
.
Standard deviation varcov
.
Logical value indicating whether an edge correction should be applied.
Arguments passed to as.mask
controlling
the pixel resolution.
Variance-covariance matrix of the Gaussian smoothing kernel.
Incompatible with sigma
.
A real-valued pixel image (an object of class "im"
,
see im.object
) whose pixel values are estimates
of the density of the reduced second moment measure
at each location.
Some writers use the term reduced second moment measure
when they mean the
As originally defined, the
reduced second moment measure is a measure, obtained by modifying
the second moment measure, while the Kest
and the reduced second moment measure is computed
by Kmeasure
.
Given a point pattern dataset,
this command computes an estimate of the reduced second moment
measure
The reduced second moment measure
In a nutshell, the command Kmeasure
computes a smoothed version
of the Fry plot.
As explained under fryplot
, the Fry plot is a scatterplot of the
vectors joining all pairs of points in the pattern.
The reduced second moment measure is (essentially) defined as
the average of the Fry plot over different realisations of the point
process. The command Kmeasure
effectively smooths the Fry plot
of a dataset to obtain an estimate of the reduced second moment measure.
In formal terms, the reduced second moment measure
The
The command Kmeasure
computes an estimate of 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
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 sigma[2]
on the 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 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.
If desired, the value of integral.im
.
One possible application is to compute anisotropic counterparts of the
Stoyan, D, Kendall, W.S. and Mecke, J. (1995) Stochastic geometry and its applications. 2nd edition. Springer Verlag.
Stoyan, D. and Stoyan, H. (1994) Fractals, random shapes and point fields: methods of geometrical statistics. John Wiley and Sons.
# NOT RUN {
plot(Kmeasure(cells, 0.05))
# shows pronounced dip around origin consistent with strong inhibition
plot(Kmeasure(redwood, 0.03), col=grey(seq(1,0,length=32)))
# shows peaks at several places, reflecting clustering and ?periodicity
M <- Kmeasure(cells, 0.05)
# evaluate measure on a sector
W <- Window(M)
ang <- as.im(atan2, W)
rad <- as.im(function(x,y){sqrt(x^2+y^2)}, W)
sector <- solutionset(ang > 0 & ang < 1 & rad < 0.6)
integral.im(M[sector, drop=FALSE])
# }
Run the code above in your browser using DataLab