SLIK.adapt | R Documentation |
Isotropic global and pilot bandwidth selection for adaptive density/intensity based on likelihood cross-validation.
SLIK.adapt(
pp,
hold = TRUE,
start = rep(OS(pp), 2),
hlim = NULL,
edge = TRUE,
zero.action = c(-1, 0),
optim.control = list(),
parallelise = NULL,
verbose = TRUE,
...
)
pp |
An object of class |
hold |
Logical value indicating whether to hold the global and pilot bandwidths equal throughout the
optimisation; defaults to |
start |
A positively-valued numeric vector of length 2 giving the starting values to be used for the global/pilot
optimisation routine when |
hlim |
An optional vector of length 2 giving the limits of the
optimisation routine with respect to the bandwidth when |
edge |
Logical value indicating whether to edge-correct the density estimates used. |
zero.action |
A numeric vector of length 2, each value being either |
optim.control |
An optional list to be passed to the |
parallelise |
Numeric argument to invoke parallel processing in the brute force leave-one-out calculations, giving
the number of CPU cores to use. Experimental. Test
your system first using |
verbose |
Logical value indicating whether to provide function progress commentary. |
... |
Additional arguments controlling density estimation for the internal calculations. Relevant arguments are |
This function is a generalisation of LIK.density
, and is used in attempts to simultaneously choose
an optimal global and pilot bandwidth for adaptive kernel density estimates. Where LIK.density
for adaptive
estimates assumes the pilot density is held constant (and is not subject to the leave-one-out operations), this function
allows the pilot bandwidth to vary alongside the global.
Thus, in contrast to LIK.density
the internal leave-one-out operations now also affect the
pilot estimation stage. Hence, the set of variable bandwidths changes as each point is left out. In turn, this means the leave-one-out operations must
be computed by brute force, and this is computationally expensive.
Identifiability problems can sometimes arise when the global and pilot bandwidths are allowed to ‘float freely’ in the bivariate optimisation routine, which is the default
behaviour of the function (with hold = FALSE
). This can be curbed by setting hold = TRUE
, which forces both the global and pilot
to be held at the same value during optimisation. Doing this also has the beneficial side effect of turning the problem into one of univariate optimisation, thereby reducing total computational cost. Current work (Davies & Lawson, 2018) provides some empirical evidence that this strategy performs quite well in practice.
Like LSCV.density
and LIK.density
, the argument zero.action
can be used to control the level of severity in response to small bandwidths that result (due to numerical error) in at least one density value being zero or less.
When this argument is passed a vector of length 2, the first entry corresponds to the global bandwidth (and hence refers to checks of the final adaptive density estimate and its leave-one-out values) and the second to the pilot bandwidth (and hence checks the fixed-bandwidth pilot density and its leave-one-out values).
Alternatively a single value may be supplied, which will be taken to be the same for both global and pilot.
See the help page for LIK.density
for an explanation of the four allowable values (-1
, 0
, 1
, 2
) for each component of this argument.
A numeric vector of length 2 giving the likelihood-maximised global and pilot bandwidths.
While theoretically valid, this is a largely experimental function. There is presently little in the literature to suggest how well this type of simultaneous global/pilot bandwidth selection might perform in practice. Current research efforts (Davies & Lawson, 2018) seek in part to address these questions.
T. M. Davies
Davies, T.M. and Lawson, A.B. (2018), An evaluation of likelihood-based bandwidth selectors for spatial and spatiotemporal kernel estimates, Submitted for publication.
Silverman, B.W. (1986), Density Estimation for Statistics and Data Analysis, Chapman & Hall, New York.
Wand, M.P. and Jones, C.M., 1995. Kernel Smoothing, Chapman & Hall, London.
Functions for bandwidth selection in package
spatstat
: bw.diggle
;
bw.ppl
; bw.scott
;
bw.frac
.
data(pbc)
pbccas <- split(pbc)$case
SLIK.adapt(pbccas)
SLIK.adapt(pbccas,hold=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.