Learn R Programming

spatstat.explore (version 3.0-6)

hopskel: Hopkins-Skellam Test

Description

Perform the Hopkins-Skellam test of Complete Spatial Randomness, or simply calculate the test statistic.

Usage

hopskel(X)

hopskel.test(X, ..., alternative=c("two.sided", "less", "greater", "clustered", "regular"), method=c("asymptotic", "MonteCarlo"), nsim=999)

Value

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.

Arguments

X

Point pattern (object of class "ppp").

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.

Author

Adrian Baddeley Adrian.Baddeley@curtin.edu.au, Rolf Turner r.turner@auckland.ac.nz and Ege Rubak rubak@math.aau.dk.

Details

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, \ldots, 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, \ldots, 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.

References

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.

See Also

clarkevans, clarkevans.test, nndist, nncross

Examples

Run this code
  hopskel(redwood)
  hopskel.test(redwood, alternative="clustered")

Run the code above in your browser using DataLab