pcfinhom(X, lambda = NULL, ..., r = NULL, kernel = "epanechnikov", bw = NULL, stoyan = 0.15, correction = c("translate", "Ripley"), divisor = c("r", "d"), renormalise = TRUE, normpower=1, update = TRUE, leaveoneout = TRUE, reciplambda = NULL, sigma = NULL, varcov = NULL)
"ppp"
).
X
,
a pixel image (object of class "im"
) giving the
intensity values at all locations, a fitted point process model
(object of class "ppm"
) or a function(x,y)
which
can be evaluated to give the intensity value at any location.
density.default
.
density.default
.
density.default
.
pcf.ppp
.
"r"
(the default) or "d"
.
See pcf.ppp
.
lambda
is a fitted model
(class "ppm"
, "kppm"
or "dppm"
)
and update=TRUE
(the default),
the model will first be refitted to the data X
(using update.ppm
or update.kppm
)
before the fitted intensity is computed.
If update=FALSE
, the fitted intensity of the
model will be computed without re-fitting it to X
.
density.ppp
or
fitted.ppm
) specifying whether to use a
leave-one-out rule when calculating the intensity.
lambda
.
Values of the estimated reciprocal $1/lambda$
of the intensity function.
Either a vector giving the reciprocal intensity values
at the points of the pattern X
,
a pixel image (object of class "im"
) giving the
reciprocal intensity values at all locations,
or a function(x,y)
which can be evaluated to give the
reciprocal intensity value at any location.
density.ppp
to control the smoothing bandwidth, when lambda
is
estimated by kernel smoothing.
"fv"
).
Essentially a data frame containing the variablesas required.
The best intuitive interpretation is the following: the probability $p(r)$ of finding two points at locations $x$ and $y$ separated by a distance $r$ is equal to $$ p(r) = \lambda(x) lambda(y) g(r) \,{\rm d}x \, {\rm d}y $$ where $lambda$ is the intensity function of the point process. For a Poisson point process with intensity function $lambda$, this probability is $p(r) = lambda(x) * lambda(y)$ so $ginhom(r) = 1$.
The inhomogeneous pair correlation function
is related to the inhomogeneous $K$ function through
$$
g_{\rm inhom}(r) = \frac{K'_{\rm inhom}(r)}{2\pi r}
$$
where $Kinhom'(r)$
is the derivative of $Kinhom(r)$, the
inhomogeneous $K$ function. See Kinhom
for information
about $Kinhom(r)$.
The command pcfinhom
estimates the inhomogeneous
pair correlation using a modified version of
the algorithm in pcf.ppp
.
If renormalise=TRUE
(the default), then the estimates
are multiplied by $c^normpower$ where
$
c = area(W)/sum[i] (1/lambda(x[i])).
$
This rescaling reduces the variability and bias of the estimate
in small samples and in cases of very strong inhomogeneity.
The default value of normpower
is 1
but the most sensible value is 2, which would correspond to rescaling
the lambda
values so that
$
sum[i] (1/lambda(x[i])) = area(W).
$
pcf
,
pcf.ppp
,
Kinhom
data(residualspaper)
X <- residualspaper$Fig4b
plot(pcfinhom(X, stoyan=0.2, sigma=0.1))
fit <- ppm(X, ~polynom(x,y,2))
plot(pcfinhom(X, lambda=fit, normpower=2))
Run the code above in your browser using DataLab