Computes an adaptive estimate of the intensity function (using a variable-bandwidth smoothing kernel) for each of the components of a split point pattern, or each of the point patterns in a list.
# S3 method for splitppp
densityAdaptiveKernel(X, bw=NULL, ..., weights=NULL)# S3 method for ppplist
densityAdaptiveKernel(X, bw=NULL, ..., weights=NULL)
A list of pixel images (objects of class "im"
)
which can be plotted or printed;
or a list of numeric vectors giving the values at specified points.
Split point pattern (object of class "splitppp"
created by split.ppp
) to be smoothed.
Alternatively a list of point patterns,
of class "ppplist"
.
Smoothing bandwidths. See Details.
Additional arguments passed to
densityAdaptiveKernel.ppp
.
These may include arguments that will be passed to
bw.abram
to compute
the smoothing bandwidths if bw
is missing,
and arguments passed to as.mask
to control the spatial resolution of the result.
Numerical weights for the points. See Details.
Adrian Baddeley Adrian.Baddeley@curtin.edu.au.
This function computes a spatially-adaptive kernel estimate of the
spatially-varying intensity for each of the point patterns
in the list X
, using densityAdaptiveKernel.ppp
.
The argument bw
specifies smoothing bandwidths
for the data points.
Normally it should be a list, with the same length as
x
. The entry bw[[i]]
will determine the
smoothing bandwidths for the pattern x[[i]]
, and may be given in
any format acceptable to densityAdaptiveKernel.ppp
.
For example, bw[[i]]
can be
a numeric vector of length equal to npoints(x[[i]])
,
a single numeric value,
a pixel image (object of class "im"
),
an expression
, or a function of class "funxy"
.
For convenience, bw
can also be a single expression
,
or a single pixel image, or a single function.
If bw
is missing or NULL
, the default is to compute
bandwidths using bw.abram.ppp
.
The argument weights
specifies numerical case weights
for the data points.
Normally it should be a list, with the same length as
x
. The entry weights[[i]]
will determine the
case weights for the pattern x[[i]]
, and may be given in
any format acceptable to density.ppp
.
For example, weights[[i]]
can be
a numeric vector of length equal to npoints(x[[i]])
,
a single numeric value, a numeric matrix,
a pixel image (object of class "im"
),
an expression
, or a function of class "funxy"
.
For convenience, weights
can also be a single expression
,
or a single pixel image (object of class "im"
),
or a single function of class "funxy"
.
If weights
is missing or NULL
, all weights are assumed
to be equal to 1.
densityAdaptiveKernel.ppp
,
bw.abram.ppp
.
X <- amacrine
if(!interactive()) X <- X[c(TRUE,FALSE,FALSE,FALSE)]
Z <- densityAdaptiveKernel(split(X), h0=0.15)
plot(Z, main="Adaptive kernel estimate")
Run the code above in your browser using DataLab