pcf(X, ..., method="c")
"c"indicating the method for deriving the pair correlation function from the
Kestfor 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
Kdot) and the
inhomogeneous $K$ function (see
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)$ from an estimate of $K(r)$ or its variants, using smoothing splines to approximate the derivative.
X may be either
"ppp", or in a format recognised by
fasp.object) containing several estimates of$K$functions. This should have been obtained from
alltypeswith the argument
Xis a point pattern, the $K$ function is first estimated by
Kest. The smoothing spline operations are performed by
modreglibrary. Three numerical methods are available:
"c"seems to be the best at suppressing variability for small values of $r$. However it effectively constrains $g(0) = 1$. If the point pattern seems to have inhibition at small distances, you may wish to experiment with method
"b"which effectively constrains $g(0)=0$. Method
"a"seems comparatively unreliable.
Useful arguments to control the splines
include the smoothing tradeoff parameter
and the degrees of freedom
Stoyan, D. and Stoyan, H. (1994) Fractals, random shapes and point fields: methods of geometrical statistics. John Wiley and Sons.
library(spatstat) data(simdat) p <- pcf(simdat) plot(p$r, p$pcf, type="l", xlab="r", ylab="g(r)", main="pair correlation") abline(h=1, lty=1) # multitype point pattern data(ganglia) p <- pcf(alltypes(ganglia, "K"), spar=0.5, method="b") conspire(p, cbind(pcf,1) ~ r, subset="r <= 0.2", title="Pair correlation functions for ganglia")