Description Usage Arguments Details Value Warnings Author(s) References See Also Examples

Estimates the nearest neighbour distance distribution
function *G(r)* from a point pattern in a
window of arbitrary shape.

1 2 3 |

`X` |
The observed point pattern,
from which an estimate of |

`r` |
Optional. Numeric vector. The values of the argument |

`breaks` |
This argument is for internal use only. |

`...` |
Ignored. |

`correction` |
Optional.
The edge correction(s) to be used to estimate |

`domain` |
Optional. Calculations will be restricted to this subset of the window. See Details. |

The nearest neighbour distance distribution function
(also called the “*event-to-event*” or
“*inter-event*” distribution)
of a point process *X*
is the cumulative distribution function *G* of the distance
from a typical random point of *X* to
the nearest other point of *X*.

An estimate of *G* derived from a spatial point pattern dataset
can be used in exploratory data analysis and formal inference
about the pattern (Cressie, 1991; Diggle, 1983; Ripley, 1988).
In exploratory analyses, the estimate of *G* is a useful statistic
summarising one aspect of the “clustering” of points.
For inferential purposes, the estimate of *G* is usually compared to the
true value of *G* for a completely random (Poisson) point process,
which is

*
G(r) = 1 - exp( - lambda * pi * r^2)*

where *lambda* is the intensity
(expected number of points per unit area).
Deviations between the empirical and theoretical *G* curves
may suggest spatial clustering or spatial regularity.

This algorithm estimates the nearest neighbour distance distribution
function *G*
from the point pattern `X`

. It assumes that `X`

can be treated
as a realisation of a stationary (spatially homogeneous)
random spatial point process in the plane, observed through
a bounded window.
The window (which is specified in `X`

as `Window(X)`

)
may have arbitrary shape.

The argument `X`

is interpreted as a point pattern object
(of class `"ppp"`

, see `ppp.object`

) and can
be supplied in any of the formats recognised
by `as.ppp()`

.

The estimation of *G* is hampered by edge effects arising from
the unobservability of points of the random pattern outside the window.
An edge correction is needed to reduce bias (Baddeley, 1998; Ripley, 1988).
The edge corrections implemented here are the border method or
“*reduced sample*” estimator, the spatial Kaplan-Meier estimator
(Baddeley and Gill, 1997) and the Hanisch estimator (Hanisch, 1984).

The argument `r`

is the vector of values for the
distance *r* at which *G(r)* should be evaluated.
It is also used to determine the breakpoints
(in the sense of `hist`

)
for the computation of histograms of distances. The
estimators are computed from histogram counts.
This introduces a discretisation
error which is controlled by the fineness of the breakpoints.

First-time users would be strongly advised not to specify `r`

.
However, if it is specified, `r`

must satisfy `r[1] = 0`

,
and `max(r)`

must be larger than the radius of the largest disc
contained in the window. Furthermore, the successive entries of `r`

must be finely spaced.

The algorithm also returns an estimate of the hazard rate function,
*lambda(r)*, of *G(r)*. The hazard rate is
defined as the derivative

*
lambda(r) = - (d/dr) log(1 - G(r))*

This estimate should be used with caution as *G* is not necessarily
differentiable.

If the argument `domain`

is given, the estimate of *G(r)*
will be based only on the nearest neighbour distances
measured from points falling inside `domain`

(although their
nearest neighbours may lie outside `domain`

).
This is useful in bootstrap techniques. The argument `domain`

should be a window (object of class `"owin"`

) or something acceptable to
`as.owin`

. It must be a subset of the
window of the point pattern `X`

.

The naive empirical distribution of distances from each point of
the pattern `X`

to the nearest other point of the pattern,
is a biased estimate of *G*. However it is sometimes useful.
It can be returned by the algorithm, by selecting `correction="none"`

.
Care should be taken not to use the uncorrected
empirical *G* as if it were an unbiased estimator of *G*.

To simply compute the nearest neighbour distance for each point in the
pattern, use `nndist`

. To determine which point is the
nearest neighbour of a given point, use `nnwhich`

.

An object of class `"fv"`

, see `fv.object`

,
which can be plotted directly using `plot.fv`

.

Essentially a data frame containing some or all of the following columns:

`r` |
the values of the argument |

`rs` |
the “reduced sample” or “border correction”
estimator of |

`km` |
the spatial Kaplan-Meier estimator of |

`hazard` |
the hazard rate |

`raw` |
the uncorrected estimate of |

`han` |
the Hanisch correction estimator of |

`theo` |
the theoretical value of |

The function *G* does not necessarily have a density.
Any valid c.d.f. may appear as the nearest neighbour distance
distribution function of a stationary point process.

The reduced sample estimator of *G* is pointwise approximately
unbiased, but need not be a valid distribution function; it may
not be a nondecreasing function of *r*. Its range is always
within *[0,1]*.

The spatial Kaplan-Meier estimator of *G* is always nondecreasing
but its maximum value may be less than *1*.

and \rolf

Baddeley, A.J. Spatial sampling and censoring.
In O.E. Barndorff-Nielsen, W.S. Kendall and
M.N.M. van Lieshout (eds)
*Stochastic Geometry: Likelihood and Computation*.
Chapman and Hall, 1998.
Chapter 2, pages 37-78.

Baddeley, A.J. and Gill, R.D.
Kaplan-Meier estimators of interpoint distance
distributions for spatial point processes.
*Annals of Statistics* **25** (1997) 263-292.

Cressie, N.A.C. *Statistics for spatial data*.
John Wiley and Sons, 1991.

Diggle, P.J. *Statistical analysis of spatial point patterns*.
Academic Press, 1983.

Hanisch, K.-H. (1984) Some remarks on estimators of the distribution
function of nearest-neighbour distance in stationary spatial point
patterns. *Mathematische Operationsforschung und Statistik,
series Statistics* **15**, 409–412.

Ripley, B.D. *Statistical inference for spatial processes*.
Cambridge University Press, 1988.

Stoyan, D, Kendall, W.S. and Mecke, J.
*Stochastic geometry and its applications*.
2nd edition. Springer Verlag, 1995.

`nndist`

,
`nnwhich`

,
`Fest`

,
`Jest`

,
`Kest`

,
`km.rs`

,
`reduced.sample`

,
`kaplan.meier`

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.