K(t)
, Ripleys K function for a spatial point pattern.
Khat(object, maxdist=<<see below>>, ndist=100, boundary=bbox(object), plot.it=T)
"spp"
representing a spatial point pattern,
or a data frame or matrix with first two columns containing
locations of a point pattern.
Khat
should
be estimated. Defaults to half the length of a diagonal of the
sample's bounding box.
Khat
.
Default is
100
.
The distances for which
Khat
will be estimated are calculated as
seq(0,maxdist,ndist)
, both
maxdist
and
ndist
will change if
not reasonable for the given
object
.
boundary
should be
given as a list with named components
"x"
and
"y"
denoting the
corners of the rectangular region. For example, for the unit square
the boundary could be given as
bbox(x=c(0,1),y=c(0,1))
, the bounding
box of two diagonally opposed points.
Defaults to a rectangle covering the range of points.
K
-estimates be plotted?
Default is
TRUE
.
dist
, contains the
distances at which
Khat
was computed,
and the second column, named
Khat
, contains the values of
K(dist)
.
K(t)=t
. See DETAILS.
plot.it=TRUE
,
a plot of the value of
K(t)
against distance will be produced
on the current graphics device.
Khat
computes Ripleys (1976) estimate of K(t) for a spatial point pattern:
K(t) = (1/intensity) * E[number of events < or = distance
t
of an arbitrary event].
The theoretical K-function for a Poisson completely spatially random process is
K(t) = pi t^2, so L(t) = sqrt(K(t)/pi) is equal to
t
, the distances.
The default plots
K(t)
versus
t
.
See function
Lhat
for estimation of
L(t)
.
Ripley, Brian D. (1976). The second-order analysis of stationary point processes. Journal of Applied Probability, 13,255-266.
lansing.spp <- as.spp(lansing) lansing.khat <- Khat(lansing.spp) Khat(wheat) abline(0,1)