Skip to contents

Stoyan's \(k_{mm}(r) = E(m_i m_j | d_{ij} = r) / E(m)^2\), estimated as spatstat.explore::markcorr with method = "density": Gaussian kernel smoothing (stats::density, bw.nrd0 bandwidth of the pair distances) of the pair contributions \(m_i m_j e_{ij}\) over the weights \(e_{ij}\), with Ripley's isotropic (capped at 100) or the translation edge weights. Where the smoothed pair density is below 1e-6 of its maximum the ratio is undefined and returned as NaN.

Usage

MarkCorrelation(
  points,
  marks,
  window,
  r = NULL,
  rmax = NULL,
  correction = "iso",
  normalise = TRUE
)

Arguments

points

Two-column matrix of coordinates.

marks

Non-negative numeric marks.

window

c(xmin, xmax, ymin, ymax).

r

Distances (default 513 values up to the Kest rmax rule).

rmax

Largest distance for the default r.

correction

"iso" or "trans".

normalise

Divide by \(E(m)^2\).

Value

List with r, k, bw, theo.

References

Stoyan, D. and Stoyan, H. (1994). Fractals, Random Shapes and Point Fields. Wiley, Chichester.

Examples

P <- cbind(c(.1, .4, .35, .8, .7, .55, .2, .9, .15, .6), c(.2, .8, .3, .6, .15, .5, .65, .9,
  .95, .85))
MarkCorrelation(P, c(1, 2, 1.5, 3, .5, 2.5, 1, 2, .8, 1.2), c(0, 1, 0, 1))$k[257]
#> [1] 0.9989594