Kcom(object, r = NULL, breaks = NULL, ...,
correction = c("border", "isotropic", "translate"),
conditional = !is.poisson(object),
restrict = FALSE,
model = NULL,
trend = ~1, interaction = Poisson(), rbord = reach(interaction),
compute.var = TRUE,
truecoef = NULL, hi.res = NULL)
"ppm"
)
or a point pattern (object of class "ppp"
)
or quadrature scheme (object of class "quad"
).Kest
for options.restrict=TRUE
) or
the reweighting estimator (restrict=FALSE
, the default).
Applies only if conditional=TRUE
.
See Details."ppm"
) to be re-fitted to the data
using update.ppm
, if object
is a point pattern.
Overrides the arguments hi.res
.quadscheme
.
If this argument is present, the model will be
re-fitted at high resolution as specified by these parameters.
The coefficients
of the re The first argument, object
, is usually a fitted point process model
(object of class "ppm"
), obtained from the
model-fitting function ppm
.
For convenience, object
can also be a point pattern
(object of class "ppp"
). In that case, a point process
model will be fitted to it, by calling ppm
using the arguments
trend
(for the first order trend),
interaction
(for the interpoint interaction)
and rbord
(for the erosion distance in the border correction
for the pseudolikelihood). See ppm
for details
of these arguments.
The algorithm first extracts the original point pattern dataset
(to which the model was fitted) and computes the
standard nonparametric estimates of the $K$ function.
It then also computes the model compensator of the
$K$ function. The different function estimates are returned
as columns in a data frame (of class "fv"
).
The argument correction
determines the edge correction(s)
to be applied. See Kest
for explanation of the principle
of edge corrections. The following table gives the options
for the correction
argument, and the corresponding
column names in the result:
correction
description of correction nonparametric compensator
"isotropic"
Ripley isotropic correction
iso
icom
"translate"
Ohser-Stoyan translation correction
trans
tcom
"border"
border correction
border
bcom
}
The nonparametric estimates can all be expressed in the form $$\hat K(r) = \sum_i \sum_{j < i} e(x_i,x_j,r,x) I{ d(x_i,x_j) \le r }$$ where $x_i$ is the $i$-th data point, $d(x_i,x_j)$ is the distance between $x_i$ and $x_j$, and $e(x_i,x_j,r,x)$ is a term that serves to correct edge effects and to re-normalise the sum. The corresponding model compensator is $${\bf C} \, \tilde K(r) = \int_W \lambda(u,x) \sum_j e(u,x_j,r,x \cup u) I{ d(u,x_j) \le r}$$ where the integral is over all locations $u$ in the observation window, $\lambda(u,x)$ denotes the conditional intensity of the model at the location $u$, and $x \cup u$ denotes the data point pattern $x$ augmented by adding the extra point $u$. If the fitted model is a Poisson point process, then the formulae above are exactly what is computed. If the fitted model is not Poisson, the formulae above are modified slightly to handle edge effects.
The modification is determined by the arguments
conditional
and restrict
.
The value of conditional
defaults to FALSE
for Poisson models
and TRUE
for non-Poisson models.
If conditional=FALSE
then the formulae above are not modified.
If conditional=TRUE
, then the algorithm calculates
the restriction estimator if restrict=TRUE
,
and calculates the reweighting estimator if restrict=FALSE
.
See Appendix D of Baddeley, Rubak and "fv"
),
essentially a data frame of function values.
There is a plot method for this class. See fv.object
.