
Last chance! 50% off unlimited learning
Sale ends in
Takes slices of a multi-scale density/intensity estimate at desired global bandwidths
multiscale.slice(msob, h0, checkargs = TRUE)
An object of class msden
giving the multi-scale
estimate from which to take slices.
Desired global bandwidth(s); the density/intensity estimate
corresponding to which will be returned. A numeric vector. All values must be in the
available range provided by msob$h0range
; see `Details'.
Logical value indicating whether to check validity of
msob
and h0
. Disable only if you know this check will be
unnecessary.
If h0
is scalar, an object of class bivden
with components
corresponding to the requested slice at h0
. If h0
is a vector, a list of objects
of class bivden
.
Davies & Baddeley (2017) demonstrate that once a multi-scale
density/intensity estimate has been computed, we may take slices parallel to
the spatial domain of the trivariate convolution to return the estimate at
any desired global bandwidth. This function is the implementation thereof
based on a multi-scale estimate resulting from a call to
multiscale.density
.
The function returns an error if the
requested slices at h0
are not all within the available range of
pre-computed global bandwidth scalings as defined by the h0range
component of msob
.
Because the contents of the msob
argument, an object of class
msden
, are returned based on a discretised set of global
bandwidth scalings, the function internally computes the desired surface as
a pixel-by-pixel linear interpolation using the two discretised global
bandwidth rescalings that bound each requested h0
. (Thus, numeric
accuracy of the slices is improved with an increase to the dimz
argument of the preceding call to multiscale.density
at the cost of
additional computing time.)
Davies, T.M. and Baddeley A. (2017), Fast computation of spatially adaptive kernel estimates, Statistics and Computing, [to appear].
# NOT RUN {
data(chorley) # Chorley-Ribble data (package 'spatstat')
ch.multi <- multiscale.density(chorley,h0=1,h0fac=c(0.5,2))
available.h0(ch.multi)
ch.slices <- multiscale.slice(ch.multi,h0=c(0.7,1.1,1.6))
par(mfcol=c(2,3)) # plot each density and edge-correction surface
for(i in 1:3) { plot(ch.slices[[i]]$z); plot(ch.slices[[i]]$q) }
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab