bw.diggle(X, ..., correction="good", hmax=NULL, nr=512)
"ppp"
).
Kest
determining the edge correction to be used to
calculate the $K$ function.
"bw.optim"
which can be plotted.
sigma
returned by bw.diggle
(and displayed on the horizontal axis of the plot)
corresponds to h/2
, where h
is the smoothing
parameter described in Diggle (2003, pages 116-118) and
Berman and Diggle (1989).
In those references, the smoothing kernel
is the uniform density on the disc of radius h
. In
density.ppp
, the smoothing kernel is the
isotropic Gaussian density with standard deviation sigma
.
When replacing one kernel by another, the usual
practice is to adjust the bandwidths so that the kernels have equal
variance (cf. Diggle 2003, page 118). This implies that sigma = h/2
.sigma
for the kernel estimator of point process intensity
computed by density.ppp
.The bandwidth $\sigma$ is chosen to minimise the mean-square error criterion defined by Diggle (1985). The algorithm uses the method of Berman and Diggle (1989) to compute the quantity $$ M(\sigma) = \frac{\mbox{MSE}(\sigma)}{\lambda^2} - g(0) $$ as a function of bandwidth $\sigma$, where $MSE(\sigma)$ is the mean squared error at bandwidth $\sigma$, while $\lambda$ is the mean intensity, and $g$ is the pair correlation function. See Diggle (2003, pages 115-118) for a summary of this method.
The result is a numerical value giving the selected bandwidth.
The result also belongs to the class "bw.optim"
which can be plotted to show the (rescaled) mean-square error
as a function of sigma
.
Diggle, P.J. (1985) A kernel method for smoothing point process data. Applied Statistics (Journal of the Royal Statistical Society, Series C) 34 (1985) 138--147.
Diggle, P.J. (2003) Statistical analysis of spatial point patterns, Second edition. Arnold.
density.ppp
,
bw.ppl
,
bw.scott
data(lansing)
attach(split(lansing))
b <- bw.diggle(hickory)
plot(b, ylim=c(-2, 0), main="Cross validation for hickories")
plot(density(hickory, b))
Run the code above in your browser using DataLab