Learn R Programming

dbmss (version 2.3-0)

Ktest: Test of a point pattern against Complete Spatial Randomness

Description

Tests the point pattern against CSR using values of the K function

Usage

Ktest(X, r)

Arguments

X
A point pattern (ppp.object). Marks are ignored. The window must be a rectangle sensu spatstat (tested by is.rectangle).
r
A vector of distances.

Value

A p-value.

Details

The test returns the risk to reject CSR erroneously, based on the distribution of the K function.

References

Lang, G. and Marcon, E. (2013). Testing randomness of spatial point patterns with the Ripley statistic. ESAIM: Probability and Statistics. 17: 767-788. Marcon, E., S. Traissac, and Lang, G. (2013). A Statistical Test for Ripley's Function Rejection of Poisson Null Hypothesis. ISRN Ecology 2013(Article ID 753475): 9.

See Also

Khat, GoFtest

Examples

Run this code

# Simulate a Matern (Neyman Scott) point pattern
nclust <- function(x0, y0, radius, n) {
  return(runifdisc(n, radius, centre=c(x0, y0)))
}
X <- rNeymanScott(20, 0.1, nclust, radius=0.2, n=5)
plot(X)

# Test it
Ktest(X, r=seq(0.1, .5, .1))

Run the code above in your browser using DataLab