Kest(X)
Kest(X, r)
Kest(X, r, correction=c("border", "isotropic", "Ripley", "translate"))
Kest(X, breaks=breaks)
"ppp"
, or data
in any format acceptable to as.ppp()
.r
.
Not normally invoked by the user.
See Details."border"
, "bord.modif"
,
"isotropic"
, "Ripley"
or "translate"
.
It specifies the edge correction(s) to be applied."border"
, "bord.modif"
,
"iso"
and/or "trans"
,
according to the selected edge corrections. These columns contain
estimates of the function $K(r)$ obtained by the edge corrections
named.Kest
estimates the $K$ function
of a stationary point process, given observation of the process
inside a known, bounded window.
The argument X
is interpreted as a point pattern object
(of class "ppp"
, see ppp.object
) and can
be supplied in any of the formats recognised by
as.ppp()
. The estimation of $K$ is hampered by edge effects arising from
the unobservability of points of the random pattern outside the window.
An edge correction is needed to reduce bias (Baddeley, 1998; Ripley, 1988).
The corrections implemented here are
[object Object],[object Object],[object Object]
Note that the estimator assumes the process is stationary (spatially
homogeneous). For inhomogeneous point patterns, see
Kinhom
.
The estimator Kest
ignores marks.
Its counterparts for multitype point patterns
are Kcross
, Kdot
,
and for general marked point patterns
see Kmulti
.
Some writers, particularly Stoyan (1994, 1995) advocate the use of
the ``pair correlation function''
$$g(r) = \frac{K'(r)}{2\pi r}$$
where $K'(r)$ is the derivative of $K(r)$.
See pcf
on how to estimate this function.
Diggle, P.J. Statistical analysis of spatial point patterns. Academic Press, 1983.
Ohser, J. (1983) On estimators for the reduced second moment measure of point processes. Mathematische Operationsforschung und Statistik, series Statistics, 14, 63 -- 71. Ripley, B.D. Statistical inference for spatial processes. Cambridge University Press, 1988.
Stoyan, D, Kendall, W.S. and Mecke, J. (1995) Stochastic geometry and its applications. 2nd edition. Springer Verlag.
Stoyan, D. and Stoyan, H. (1994) Fractals, random shapes and point fields: methods of geometrical statistics. John Wiley and Sons.
Fest
,
Gest
,
Jest
,
pcf
,
reduced.sample
,
Kcross
,
Kdot
,
Kinhom
,
Kmulti
library(spatstat)
pp <- runifpoint(50)
Kpp <- Kest(pp)
plot(Kpp$r, Kpp$border, type="l", xlab="r", ylab="K(r)", ylim=c(0,1),
main = "K-function")
r <- Kpp$r
lines(r, Kpp$theo, lty=2)
legend(0.5, 2, c("empirical (border correction)", "Poisson process"), lty=c(1,2))
data(cells)
K <- Kest(cells, correction="isotropic")
plot(K$r, K$iso, type="l")
plot(iso ~ r, type="l", data=K)
# restrict the plot to values of r less than 0.1
plot(iso ~ r, type="l", data=K[K$r <= 0.1, ])
plot(iso ~ r, type="l", data=K, subset=(r <= 0.1))
Run the code above in your browser using DataCamp Workspace