
Last chance! 50% off unlimited learning
Sale ends in
Estimates Ripley's reduced second moment function
Kest(X, …, r=NULL, rmax=NULL, breaks=NULL,
correction=c("border", "isotropic", "Ripley", "translate"),
nlarge=3000, domain=NULL, var.approx=FALSE, ratio=FALSE)
The observed point pattern,
from which an estimate of "ppp"
, or data
in any format acceptable to as.ppp()
.
Ignored.
Optional. Vector of values for the argument rmax
.
Optional. Maximum desired value of the argument
This argument is for internal use only.
Optional. A character vector containing any selection of the
options "none"
, "border"
, "bord.modif"
,
"isotropic"
, "Ripley"
, "translate"
,
"translation"
, "rigid"
,
"none"
, "good"
or "best"
.
It specifies the edge correction(s) to be applied.
Alternatively correction="all"
selects all options.
Optional. Efficiency threshold.
If the number of points exceeds nlarge
, then only the
border correction will be computed (by default), using a fast algorithm.
Optional. Calculations will be restricted to this subset of the window. See Details.
Logical. If TRUE
, the approximate
variance of
Logical.
If TRUE
, the numerator and denominator of
each edge-corrected estimate will also be saved,
for use in analysing replicated point patterns.
An object of class "fv"
, see fv.object
,
which can be plotted directly using plot.fv
.
Essentially a data frame containing columns
the vector of values of the argument
the theoretical value
If var.approx=TRUE then the return value also has columns rip and ls containing approximations to the variance of \hat K(r)Kest(r) under CSR.
If ratio=TRUE then the return value also has two attributes called "numerator" and "denominator" which are "fv" objects containing the numerators and denominators of each estimate of K(r).
To compute simulation envelopes for the envelope
.
To compute a confidence interval for the true varblock
or lohboot
.
The estimator of
Bias increases with
While
The
An estimate of
This routine Kest
estimates the 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
the border method or ``reduced sample'' estimator (see Ripley, 1988). This is the least efficient (statistically) and the fastest to compute. It can be computed for a window of arbitrary shape.
Ripley's isotropic correction (see Ripley, 1988; Ohser, 1983). This is implemented for rectangular and polygonal windows (not for binary masks).
Translation correction (Ohser, 1983). Implemented for all window geometries, but slow for complex windows.
Rigid motion correction (Ohser and Stoyan, 1981). Implemented for all window geometries, but slow for complex windows.
Uncorrected estimate.
An estimate of the K function without edge correction.
(i.e. setting
Selects the best edge correction that is available for the geometry of the window. Currently this is Ripley's isotropic correction for a rectangular or polygonal window, and the translation correction for masks.
Selects the best edge correction
that can be computed in a reasonable time.
This is the same as "best"
for datasets with fewer
than 3000 points; otherwise the selected edge correction
is "border"
, unless there are more than 100,000 points, when
it is "none"
.
The estimates of X
.
Here
Note that this estimator assumes the process is stationary (spatially
homogeneous). For inhomogeneous point patterns, see
Kinhom
.
If the point pattern X
contains more than about 3000 points,
the isotropic and translation edge corrections can be computationally
prohibitive. The computations for the border method are much faster,
and are statistically efficient when there are large numbers of
points. Accordingly, if the number of points in X
exceeds
the threshold nlarge
, then only the border correction will be
computed. Setting nlarge=Inf
or correction="best"
will prevent this from happening.
Setting nlarge=0
is equivalent to selecting only the border
correction with correction="border"
.
If X
contains more than about 100,000 points,
even the border correction is time-consuming. You may want to consider
setting correction="none"
in this case.
There is an even faster algorithm for the uncorrected estimate.
Approximations to the variance of var.approx=TRUE
, then the result of
Kest
also has a column named rip
giving values of Ripley's (1988) approximation to
ls
giving
values of Lotwick and Silverman's (1982) approximation.
If the argument domain
is given, the calculations will
be restricted to a subset of the data. In the formula for domain
. The result is an approximately unbiased estimate
of domain
and the second point is unrestricted.
This is useful in bootstrap techniques. The argument domain
should be a window (object of class "owin"
) or something acceptable to
as.owin
. It must be a subset of the
window of the point pattern X
.
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''
pcf
on how to estimate this function.
Baddeley, A.J. Spatial sampling and censoring. In O.E. Barndorff-Nielsen, W.S. Kendall and M.N.M. van Lieshout (eds) Stochastic Geometry: Likelihood and Computation. Chapman and Hall, 1998. Chapter 2, pages 37--78.
Cressie, N.A.C. Statistics for spatial data. John Wiley and Sons, 1991.
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.
Ohser, J. and Stoyan, D. (1981) On the second-order and orientation analysis of planar stationary point processes. Biometrical Journal 23, 523--533.
Ripley, B.D. (1977) Modelling spatial patterns (with discussion). Journal of the Royal Statistical Society, Series B, 39, 172 -- 212.
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.
localK
to extract individual summands in the
pcf
for the pair correlation.
Fest
,
Gest
,
Jest
for alternative summary functions.
Kcross
,
Kdot
,
Kinhom
,
Kmulti
for counterparts of the
reduced.sample
for the calculation of reduced sample
estimators.
# NOT RUN {
X <- runifpoint(50)
K <- Kest(X)
K <- Kest(cells, correction="isotropic")
plot(K)
plot(K, main="K function for cells")
# plot the L function
plot(K, sqrt(iso/pi) ~ r)
plot(K, sqrt(./pi) ~ r, ylab="L(r)", main="L function for cells")
# }
Run the code above in your browser using DataLab