The function smooth.ppp
performs spatial smoothing of numeric values
observed at a set of irregular locations. The functions
markmean
and markvar
are wrappers for smooth.ppp
which compute the spatially-varying mean and variance of the marks of
a point pattern. Smoothing is performed by Gaussian kernel weighting. If the
observed values are $v_1,\ldots,v_n$
at locations $x_1,\ldots,x_n$ respectively,
then the smoothed value at a location $u$ is
(ignoring edge corrections)
$$g(u) = \frac{\sum_i k(u-x_i) v_i}{\sum_i k(u-x_i)}$$
where $k$ is a Gaussian kernel.
The argument X
must be a marked point pattern (object
of class "ppp"
, see ppp.object
).
The points of the pattern are taken to be the
observation locations $x_i$, and the marks of the pattern
are taken to be the numeric values $v_i$ observed at these
locations.
The numerator and denominator are computed by density.ppp
.
The arguments ...
control the smoothing kernel parameters
and determine whether edge correction is applied.
See density.ppp
.
The optional argument weights
allows numerical weights to
be applied to the data. If a weight $w_i$
is associated with location $x_i$, then the smoothed
function is
(ignoring edge corrections)
$$g(u) = \frac{\sum_i k(u-x_i) v_i w_i}{\sum_i k(u-x_i) w_i}$$