Pair Correlation Function of Point Pattern

Estimates the pair correlation function of a point pattern using kernel methods.

pcf.ppp(X, ..., kernel="epanechnikov", bw=NULL, stoyan=0.15,
                    correction=c("translate", "ripley"))
A point pattern (object of class "ppp").
Choice of smoothing kernel, passed to density.
Bandwidth for smoothing kernel, passed to density.
Other arguments passed to the kernel density estimation function density.
Bandwidth coefficient; see Details.
Choice of edge correction.

The pair correlation function of a stationary point process is $$g(r) = \frac{K'(r)}{2\pi r}$$ where $K'(r)$ is the derivative of $K(r)$, the reduced second moment function (aka ``Ripley's $K$ function'') of the point process. See Kest for information about $K(r)$. For a stationary Poisson process, the pair correlation function is identically equal to 1. Values $g(r) < 1$ suggest inhibition between points; values greater than 1 suggest clustering.

This routine computes an estimate of $g(r)$ by the kernel smoothing method (Stoyan and Stoyan (1994), pages 284--285). By default, their recommendations are followed exactly.

If correction="translate" then the translation correction is used. The estimate is given in equation (15.15), page 284 of Stoyan and Stoyan (1994).

If correction="ripley" then Ripley's isotropic edge correction is used; the estimate is given in equation (15.18), page 285 of Stoyan and Stoyan (1994).

If correction=c("translate", "ripley") then both estimates will be computed.

The choice of smoothing kernel is controlled by the argument kernel which is passed to density. The default is the Epanechnikov kernel, recommended by Stoyan and Stoyan (1994, page 285).

The bandwidth of the smoothing kernel can be controlled by the argument bw. Its precise interpretation is explained in the documentation for density. For the Epanechnikov kernel, the argument bw is equivalent to $h/\sqrt{5}$.

Stoyan and Stoyan (1994, page 285) recommend using the Epanechnikov kernel with support $[-h,h]$ chosen by the rule of thumn $h = c/\sqrt{\lambda}$, where {lambda} is the (estimated) intensity of the point process, and $c$ is a constant in the range from 0.1 to 0.2. See equation (15.16). If bw is missing, then this rule of thumb will be applied. The argument stoyan determines the value of $c$. Stoyan, D. and Stoyan, H. (1994) Fractals, random shapes and point fields: methods of geometrical statistics. John Wiley and Sons. Kest, pcf, density data(simdat) p <- pcf(simdat) simdat <- simdat[seq(1,simdat$n, by=4)] plot(p, main="pair correlation function for simdat") # indicates inhibition at distances r < 0.3 [object Object],[object Object] spatial


  • A function value table (object of class "fv"). Essentially a data frame containing the variables
  • rthe vector of values of the argument $r$ at which the pair correlation function $g(r)$ has been estimated
  • theovector of values equal to 1, the theoretical value of $g(r)$ for the Poisson process
  • transvector of values of $g(r)$ estimated by translation correction
  • ripleyvector of values of $g(r)$ estimated by Ripley isotropic correction
  • as required.

  • pcf.ppp
Documentation reproduced from package spatstat, version 1.6-5, License: GPL version 2 or newer

Community examples

Looks like there are no examples yet.