pcfinhom | R Documentation |
Estimates the inhomogeneous pair correlation function of a point pattern using kernel methods.
pcfinhom(X, lambda = NULL, ...,
r = NULL, adaptive = FALSE,
kernel = "epanechnikov", bw = NULL, h = NULL,
bw.args = list(), stoyan = 0.15, adjust = 1,
correction = c("translate", "Ripley"),
divisor = c("r", "d", "a", "t"),
zerocor=c("weighted", "reflection", "convolution",
"bdrykern", "JonesFoster", "none"),
renormalise = TRUE, normpower = 1,
update = TRUE, leaveoneout = TRUE,
reciplambda = NULL, sigma = NULL, adjust.sigma = 1, varcov = NULL,
gref = NULL, tau = 0, fast = TRUE, var.approx = FALSE,
domain = NULL, ratio = FALSE, close = NULL)
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 |
... |
Arguments passed to |
r |
Vector of values for the argument |
adaptive |
Logical value specifying whether to use adaptive kernel smoothing
( |
kernel |
Choice of smoothing kernel, passed to |
bw |
Bandwidth for smoothing kernel. Either a single numeric value giving the standard deviation of the kernel, or a character string specifying a bandwidth selection rule, or a function that computes the selected bandwidth. See Details. |
h |
Kernel halfwidth |
bw.args |
Optional. List of additional arguments to be passed to |
stoyan |
Coefficient for Stoyan's bandwidth selection rule; see Details. |
adjust |
Numerical adjustment factor for the bandwidth.
The bandwidth actually used is |
correction |
Edge correction. A character vector specifying the choice (or choices) of edge correction. See Details. |
divisor |
Choice of divisor in the estimation formula:
either |
zerocor |
String (partially matched) specifying a correction for the boundary effect
bias at |
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. |
gref |
Optional. A pair correlation function that will be used as the
reference for the transformation to uniformity, when
|
tau |
Optional shrinkage coefficient. A single numeric value. |
fast |
Logical value specifying whether to compute the kernel smoothing
using a Fast Fourier Transform algorithm ( |
var.approx |
Logical value indicating whether to compute an analytic approximation to the variance of the estimated pair correlation. |
domain |
Optional. Calculations will be restricted to this subset of the window. See Details. |
ratio |
Logical.
If |
close |
Advanced use only. Precomputed data. See section on Advanced Use. |
The inhomogeneous pair correlation function g_{\rm inhom}(r)
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
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 g_{\rm inhom}(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 K'_{\rm inhom}(r)
is the derivative of K_{\rm inhom}(r)
, the
inhomogeneous K
function. See Kinhom
for information
about K_{\rm inhom}(r)
.
The command pcfinhom
estimates the inhomogeneous
pair correlation using a modified version of
the algorithm in pcf
. In this modified version,
the contribution from each pair of points X[i], X[j]
is
weighted by
1/(\lambda(X[i]) \lambda(X[j]))
.
The arguments divisor
, correction
and zerocor
are interpreted as described in the help file for pcf
.
If renormalise=TRUE
(the default), then the estimates
are multiplied by c^{\mbox{normpower}}
where
c = \mbox{area}(W)/\sum (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 (1/\lambda(x_i)) = \mbox{area}(W).
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 |
v |
vector of approximate values of the variance of
the estimate of |
as required.
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 g(r)
.
The return value also has an attribute "bw"
giving the
smoothing bandwidth that was used, and an attribute "info"
containing details of the algorithm parameters.
, \martinH and \tilman.
pcf
,
bw.bdh
,
bw.pcfinhom
g <- pcfinhom(japanesepines, divisor="a")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.