Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

pcf

Pair Correlation Function


Description

Estimate the pair correlation function.

Usage

pcf(X, ...)

Arguments

X

Either the observed data point pattern, or an estimate of its K function, or an array of multitype K functions (see Details).

...

Other arguments passed to the appropriate method.

Details

The pair correlation function of a stationary point process is

g(r) = 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.

We also apply the same definition to other variants of the classical K function, such as the multitype K functions (see Kcross, Kdot) and the inhomogeneous K function (see Kinhom). For all these variants, the benchmark value of K(r) = pi * r^2 corresponds to g(r) = 1.

This routine computes an estimate of g(r) either directly from a point pattern, or indirectly from an estimate of K(r) or one of its variants.

This function is generic, with methods for the classes "ppp", "fv" and "fasp".

If X is a point pattern (object of class "ppp") then the pair correlation function is estimated using a traditional kernel smoothing method (Stoyan and Stoyan, 1994). See pcf.ppp for details.

If X is a function value table (object of class "fv"), then it is assumed to contain estimates of the K function or one of its variants (typically obtained from Kest or Kinhom). This routine computes an estimate of g(r) using smoothing splines to approximate the derivative. See pcf.fv for details.

If X is a function value array (object of class "fasp"), then it is assumed to contain estimates of several K functions (typically obtained from Kmulti or alltypes). This routine computes an estimate of g(r) for each cell in the array, using smoothing splines to approximate the derivatives. See pcf.fasp for details.

Value

Either a function value table (object of class "fv", see fv.object) representing a pair correlation function, or a function array (object of class "fasp", see fasp.object) representing an array of pair correlation functions.

Author(s)

Adrian Baddeley Adrian.Baddeley@curtin.edu.au, Rolf Turner r.turner@auckland.ac.nz and Ege Rubak rubak@math.aau.dk

References

Stoyan, D. and Stoyan, H. (1994) Fractals, random shapes and point fields: methods of geometrical statistics. John Wiley and Sons.

See Also

Examples

# ppp object
  X <- simdat
  
  p <- pcf(X)
  plot(p)

  # fv object
  K <- Kest(X)
  p2 <- pcf(K, spar=0.8, method="b")
  plot(p2)

  # multitype pattern; fasp object
  amaK <- alltypes(amacrine, "K")
  amap <- pcf(amaK, spar=1, method="b")
  plot(amap)

spatstat.core

Core Functionality of the 'spatstat' Family

v2.1-2
GPL (>= 2)
Authors
Adrian Baddeley [aut, cre], Rolf Turner [aut], Ege Rubak [aut], Kasper Klitgaard Berthelsen [ctb], Achmad Choiruddin [ctb], Jean-Francois Coeurjolly [ctb], Ottmar Cronie [ctb], Tilman Davies [ctb], Julian Gilbey [ctb], Yongtao Guan [ctb], Ute Hahn [ctb], Kassel Hingee [ctb], Abdollah Jalilian [ctb], Marie-Colette van Lieshout [ctb], Greg McSwiggan [ctb], Tuomas Rajala [ctb], Suman Rakshit [ctb], Dominic Schuhmacher [ctb], Rasmus Plenge Waagepetersen [ctb], Hangsheng Wang [ctb]
Initial release
2021-04-17

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.