hopskel | R Documentation |
Perform the Hopkins-Skellam test of Complete Spatial Randomness, or simply calculate the test statistic.
hopskel(X) hopskel.test(X, ..., alternative=c("two.sided", "less", "greater", "clustered", "regular"), method=c("asymptotic", "MonteCarlo"), nsim=999)
X |
Point pattern (object of class |
alternative |
String indicating the type of alternative for the hypothesis test. Partially matched. |
method |
Method of performing the test. Partially matched. |
nsim |
Number of Monte Carlo simulations to perform, if a Monte Carlo p-value is required. |
... |
Ignored. |
Hopkins and Skellam (1954) proposed a test of Complete Spatial Randomness based on comparing nearest-neighbour distances with point-event distances.
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 ith 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 = (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.
The value of 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.
.
Hopkins, B. and Skellam, J.G. (1954) A new method of determining the type of distribution of plant individuals. Annals of Botany 18, 213–227.
clarkevans
,
clarkevans.test
,
nndist
,
nncross
hopskel(redwood) hopskel.test(redwood, alternative="clustered")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.