The $J$ function (Van Lieshout and Baddeley ,1996)
of a stationary point process is defined as
$$J(r) = \frac{1-G(r)}{1-F(r)}$$
where $G(r)$ is the nearest neighbour distance distribution
function of the point process (see Gest
)
and $F(r)$ is its empty space function (see Fest
). For a completely random (uniform Poisson) point process,
the $J$-function is identically equal to $1$.
Deviations $J(r) < 1$ or $J(r) > 1$
typically indicate spatial clustering or spatial regularity, respectively.
The $J$-function is one of the few characteristics that can be
computed explicitly for a wide range of point processes.
See Van Lieshout and Baddeley (1996), Baddeley et al (2000),
Thonnes and Van Lieshout (1999) for further information.
An estimate of $J$ derived from a spatial point pattern dataset
can be used in exploratory data analysis and formal inference
about the pattern. The estimate of $J(r)$ is compared against the
constant function $1$.
Deviations $J(r) < 1$ or $J(r) > 1$
may suggest spatial clustering or spatial regularity, respectively.
This algorithm estimates the $J$-function
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 X$window
)
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 functions Fest
and Gest
are called to
compute estimates of $F(r)$ and $G(r)$ respectively.
These estimates are then combined by simply taking the ratio
$J(r) = (1-G(r))/(1-F(r))$.
In fact three different estimates are computed
using different edge corrections (Baddeley, 1998).
The Kaplan-Meier estimate (returned as km
) is the ratio
J = (1-G)/(1-F)
of the Kaplan-Meier estimates of
$1-F$ and $1-G$ computed by
Fest
and Gest
respectively.
The reduced-sample or border corrected estimate
(returned as rs
) is
the same ratio J = (1-G)/(1-F)
of the border corrected estimates.
These estimators are slightly biased for $J$,
since they are ratios
of approximately unbiased estimators. The logarithm of the
Kaplan-Meier estimate is unbiased for $\log J$.
The uncorrected estimate (returned as un
)
is the ratio J = (1-G)/(1-F)
of the uncorrected (``raw'') estimates of the survival functions
of $F$ and $G$,
which are the empirical distribution functions of the
empty space distances Fest(X,...)$raw
and of the nearest neighbour distances
Gest(X,...)$raw
. The uncorrected estimates
of $F$ and $G$ are severely biased.
However the uncorrected estimate of $J$
is approximately unbiased (if the process is close to Poisson);
it is insensitive to edge effects, and should be used when
edge effects are severe (see Baddeley et al, 2000).
The algorithm for Fest
uses two discrete approximations which are controlled
by the parameter eps
and by the spacing of values of r
respectively. See Fest
for details.
First-time users are strongly advised not to specify these arguments.
Note that the value returned by Jest
includes
the output of Fest
and Gest
as attributes (see the last example below).
If the user is intending to compute the F,G
and J
functions for the point pattern, it is only necessary to
call Jest
.