spatstat.core (version 2.1-2)

K3est: K-function of a Three-Dimensional Point Pattern


Estimates the \(K\)-function from a three-dimensional point pattern.


K3est(X, …,
        rmax = NULL, nrval = 128,
        correction = c("translation", "isotropic"),



Three-dimensional point pattern (object of class "pp3").



Optional. Maximum value of argument \(r\) for which \(K_3(r)\) will be estimated.


Optional. Number of values of \(r\) for which \(K_3(r)\) will be estimated. A large value of nrval is required to avoid discretisation effects.


Optional. Character vector specifying the edge correction(s) to be applied. See Details.


Logical. If TRUE, the numerator and denominator of each edge-corrected estimate will also be saved, for use in analysing replicated point patterns.


A function value table (object of class "fv") that can be plotted, printed or coerced to a data frame containing the function values.


For a stationary point process \(\Phi\) in three-dimensional space, the three-dimensional \(K\) function is $$ K_3(r) = \frac 1 \lambda E(N(\Phi, x, r) \mid x \in \Phi) $$ where \(\lambda\) is the intensity of the process (the expected number of points per unit volume) and \(N(\Phi,x,r)\) is the number of points of \(\Phi\), other than \(x\) itself, which fall within a distance \(r\) of \(x\). This is the three-dimensional generalisation of Ripley's \(K\) function for two-dimensional point processes (Ripley, 1977).

The three-dimensional point pattern X is assumed to be a partial realisation of a stationary point process \(\Phi\). The distance between each pair of distinct points is computed. The empirical cumulative distribution function of these values, with appropriate edge corrections, is renormalised to give the estimate of \(K_3(r)\).

The available edge corrections are:


the Ohser translation correction estimator (Ohser, 1983; Baddeley et al, 1993)


the three-dimensional counterpart of Ripley's isotropic edge correction (Ripley, 1977; Baddeley et al, 1993).

Alternatively correction="all" selects all options.


Baddeley, A.J, Moyeed, R.A., Howard, C.V. and Boyde, A. (1993) Analysis of a three-dimensional point pattern with replication. Applied Statistics 42, 641--668.

Ohser, J. (1983) On estimators for the reduced second moment measure of point processes. Mathematische Operationsforschung und Statistik, series Statistics, 14, 63 -- 71.

Ripley, B.D. (1977) Modelling spatial patterns (with discussion). Journal of the Royal Statistical Society, Series B, 39, 172 -- 212.

See Also

pp3 to create a three-dimensional point pattern (object of class "pp3").

pcf3est, F3est, G3est for other summary functions of a three-dimensional point pattern.

Kest to estimate the \(K\)-function of point patterns in two dimensions or other spaces.


  X <- rpoispp3(42)
  Z <- K3est(X)
  if(interactive()) plot(Z)
# }