pcfinhom {spatstat.explore} | R Documentation |
Inhomogeneous Pair Correlation Function
Description
Estimates the inhomogeneous pair correlation function of a point pattern using kernel methods.
Usage
pcfinhom(X, lambda = NULL, ..., r = NULL,
kernel = "epanechnikov",
bw = NULL, adjust.bw=1, stoyan = 0.15,
correction = c("translate", "Ripley"),
divisor = c("r", "d"),
renormalise = TRUE, normpower=1,
update = TRUE, leaveoneout = TRUE,
reciplambda = NULL,
sigma = NULL, adjust.sigma = 1,
varcov = NULL, close=NULL)
Arguments
X |
A point pattern (object of class |
lambda |
Optional.
Values of the estimated intensity function.
Either a vector giving the intensity values
at the points of the pattern |
r |
Vector of values for the argument |
kernel |
Choice of smoothing kernel, passed to |
bw |
Bandwidth for one-dimensional smoothing kernel,
passed to |
adjust.bw |
Numeric value. |
... |
Other arguments passed to the kernel density estimation
function |
stoyan |
Coefficient for Stoyan's bandwidth selection rule;
see |
correction |
Character string or character vector
specifying the choice of edge correction.
See |
divisor |
Choice of divisor in the estimation formula:
either |
renormalise |
Logical. Whether to renormalise the estimate. See Details. |
normpower |
Integer (usually either 1 or 2). Normalisation power. See Details. |
update |
Logical. If |
leaveoneout |
Logical value (passed to |
reciplambda |
Alternative to |
sigma , varcov |
Optional arguments passed to |
adjust.sigma |
Numeric value. |
close |
Advanced use only. Precomputed data. See section on Advanced Use. |
Details
The inhomogeneous pair correlation function
is a summary of the dependence between points in a spatial point
process that does not have a uniform density of points.
The best intuitive interpretation is the following: the probability
of finding two points at locations
and
separated by a distance
is equal to
where is the intensity function
of the point process.
For a Poisson point process with intensity function
, this probability is
so
.
The inhomogeneous pair correlation function
is related to the inhomogeneous function through
where
is the derivative of
, the
inhomogeneous
function. See
Kinhom
for information
about .
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 where
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
Value
A function value table (object of class "fv"
).
Essentially a data frame containing the variables
r |
the vector of values of the argument |
theo |
vector of values equal to 1,
the theoretical value of |
trans |
vector of values of |
iso |
vector of values of |
as required.
Advanced Use
To perform the same computation using several different bandwidths bw
,
it is efficient to use the argument close
.
This should be the result of closepairs(X, rmax)
for a suitably large value of rmax
, namely
rmax >= max(r) + 3 * bw
.
Author(s)
Adrian Baddeley Adrian.Baddeley@curtin.edu.au, Rolf Turner rolfturner@posteo.net and Ege Rubak rubak@math.aau.dk.
See Also
pcf
,
pcf.ppp
,
bw.stoyan
,
bw.pcf
,
Kinhom
Examples
X <- residualspaper$Fig4b
online <- interactive()
if(!online) {
## reduce size of dataset
X <- X[c(FALSE, TRUE)]
}
plot(pcfinhom(X, stoyan=0.2, sigma=0.1))
if(require("spatstat.model")) {
if(online) {
fit <- ppm(X ~ polynom(x,y,2))
} else {
## simpler model, faster computation
fit <- ppm(X ~ x)
}
plot(pcfinhom(X, lambda=fit, normpower=2))
}