Kmeasure {spatstat.explore}R Documentation

Reduced Second Moment Measure

Description

Estimates the reduced second moment measure κ\kappa from a point pattern in a window of arbitrary shape.

Usage

  Kmeasure(X, sigma, edge=TRUE, ..., varcov=NULL)

Arguments

X

The observed point pattern, from which an estimate of κ\kappa will be computed. An object of class "ppp", or data in any format acceptable to as.ppp().

sigma

Standard deviation σ\sigma of the Gaussian smoothing kernel. Incompatible with varcov.

edge

Logical value indicating whether an edge correction should be applied.

...

Arguments passed to as.mask controlling the pixel resolution.

varcov

Variance-covariance matrix of the Gaussian smoothing kernel. Incompatible with sigma.

Details

Given a point pattern dataset, this command computes an estimate of the reduced second moment measure κ\kappa of the point process. The result is a pixel image whose pixel values are estimates of the density of the reduced second moment measure.

The reduced second moment measure κ\kappa can be regarded as a generalisation of the more familiar KK-function. An estimate of κ\kappa derived from a spatial point pattern dataset can be useful in exploratory data analysis. Its advantage over the KK-function is that it is also sensitive to anisotropy and directional effects.

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 κ\kappa of a stationary point process XX is a measure defined on the two-dimensional plane such that, for a ‘typical’ point xx of the process, the expected number of other points yy of the process such that the vector yxy - x lies in a region AA, equals λκ(A)\lambda \kappa(A). Here λ\lambda is the intensity of the process, i.e. the expected number of points of XX per unit area.

The KK-function is a special case. The function value K(t)K(t) is the value of the reduced second moment measure for the disc of radius tt centred at the origin; that is, K(t)=κ(b(0,t))K(t) = \kappa(b(0,t)).

The command Kmeasure 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 xx axis, standard deviation sigma[2] on the yy axis, and zero correlation between the xx and yy 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 normalised second moment density at the centre of the pixel. (The uniform Poisson process would have values identically equal to 11.) 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.

If desired, the value of κ(A)\kappa(A) for a region AA can be estimated by computing the integral of the pixel image over the domain AA, i.e.\ summing the pixel values and multiplying by pixel area, using integral.im. One possible application is to compute anisotropic counterparts of the KK-function (in which the disc of radius tt is replaced by another shape). See Examples.

Value

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.

Warning

Some writers use the term reduced second moment measure when they mean the KK-function. This has caused confusion.

As originally defined, the reduced second moment measure is a measure, obtained by modifying the second moment measure, while the KK-function is a function obtained by evaluating this measure for discs of increasing radius. In spatstat, the KK-function is computed by Kest and the reduced second moment measure is computed by Kmeasure.

Author(s)

Adrian Baddeley Adrian.Baddeley@curtin.edu.au and Rolf Turner rolfturner@posteo.net

References

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.

See Also

Kest, fryplot, spatstat.options, integral.im, im.object

Examples

 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])

[Package spatstat.explore version 3.3-1 Index]