hopskel(X)
hopskel.test(X, ..., alternative=c("two.sided", "less", "greater", "clustered", "regular"), method=c("asymptotic", "MonteCarlo"), nsim=999)
"ppp"
).
hopskel
is a single number.The value of hopskel.test
is an object of class "htest"
representing the outcome of the test. It can be printed.
If the point pattern X
contains n
points, we first compute the nearest-neighbour distances
$P[1], ..., P[n]$
so that $P[i]$ is the distance from the $i$th data
point to the nearest other data point. Then we
generate another completely random pattern U
with
the same number n
of points, and compute for each point of U
the distance to the nearest point of X
, giving
distances $I[1], ..., I[n]$.
The test statistic is
$$
A = \frac{\sum_i P_i^2}{\sum_i I_i^2}
$$
The null distribution of $A$ is roughly
an $F$ distribution with shape parameters $(2n,2n)$.
(This is equivalent to using the test statistic $H=A/(1+A)$
and referring $H$ to the Beta distribution with parameters
$(n,n)$).
The function hopskel
calculates the Hopkins-Skellam test statistic
$A$, and returns its numeric value. This can be used as a simple
summary of spatial pattern: the value $H=1$ is consistent
with Complete Spatial Randomness, while values $H < 1$ are
consistent with spatial clustering, and values $H > 1$ are consistent
with spatial regularity.
The function hopskel.test
performs the test.
If method="asymptotic"
(the default), the test statistic $H$
is referred to the $F$ distribution. If method="MonteCarlo"
,
a Monte Carlo test is performed using nsim
simulated point
patterns.
clarkevans
,
clarkevans.test
,
nndist
,
nncross
hopskel(redwood)
hopskel(redwood)
hopskel.test(redwood, alternative="clustered")
Run the code above in your browser using DataLab