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)
Point pattern (object of class "ppp"
).
String indicating the type of alternative for the hypothesis test. Partially matched.
Method of performing the test. Partially matched.
Number of Monte Carlo simulations to perform, if a Monte Carlo p-value is required.
Ignored.
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 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
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
The function hopskel
calculates the Hopkins-Skellam test statistic
The function hopskel.test
performs the test.
If method="asymptotic"
(the default), the test statistic method="MonteCarlo"
,
a Monte Carlo test is performed using nsim
simulated point
patterns.
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.
# NOT RUN {
hopskel(redwood)
hopskel.test(redwood, alternative="clustered")
# }
Run the code above in your browser using DataLab