This function computes adaptive smoothing bandwidths
using the methods of Abramson (1982) and Hall and Marron (1988).
The function bw.abram is generic. The function
bw.abram.ppp documented here is the method
for spatial point patterns (objects of class "ppp").
If at="points" (the default) a smoothing bandwidth is
computed for each point in the pattern X. Alternatively if
at="pixels" a smoothing bandwidth is computed for
each spatial location in a pixel grid.
Under the Abramson-Hall-Marron rule, the bandwidth at location \(u\) is
$$
h(u) = \mbox{\texttt{h0}}
* \mbox{min}[ \frac{\tilde{f}(u)^{-1/2}}{\gamma}, \mbox{\texttt{trim}} ]
$$
where \(\tilde{f}(u)\) is a pilot estimate of the spatially varying
probability density. The variable bandwidths are rescaled by \(\gamma\), the
geometric mean of the \(\tilde{f}(u)^{-1/2}\) terms evaluated at the
data; this allows the global bandwidth h0 to be considered on
the same scale as a corresponding fixed bandwidth. The trimming value
trim has the same interpretation as the required `clipping' of
the pilot density at some small nominal value (see Hall and Marron,
1988), to necessarily prevent extreme bandwidths (which
can occur at very isolated observations).
The pilot density or intensity is determined as follows:
If pilot is a pixel image, this is taken as the
pilot density or intensity.
If pilot is NULL, then the pilot intensity is
computed as a fixed-bandwidth kernel
intensity estimate using density.ppp applied to
the data pattern X using
the pilot bandwidth hp.
If pilot is a different point pattern on the same spatial
domain as X, then the pilot intensity is
computed as a fixed-bandwidth kernel
intensity estimate using density.ppp applied to
pilot using the pilot bandwidth hp.
In each case the pilot density or intensity is renormalised to
become a probability density, and then the Abramson rule is applied.
Instead of calculating the pilot as a fixed-bandwidth density
estimate, the user can specify another density estimation procedure
using the argument smoother. This should be either a function
or the character string name of a function. It will replace
density.ppp as the function used to calculate the
pilot estimate. The pilot estimate will be computed as
smoother(X, sigma=hp, ...) if pilot is NULL,
or smoother(pilot, sigma=hp, ...) if pilot is a point
pattern. If smoother does not recognise the argument name
sigma for the smoothing bandwidth, then hp is effectively
ignored, as shown in the Examples.