| density.lpp {spatstat} | R Documentation |
Estimates the intensity of a point process on a linear network by applying kernel smoothing to the point pattern data.
## S3 method for class 'lpp'
density(x, sigma, ...,
weights=NULL,
kernel="gaussian",
continuous=TRUE,
epsilon = 1e-06, verbose = TRUE,
debug = FALSE, savehistory = TRUE,
old=FALSE)
## S3 method for class 'splitppx'
density(x, sigma, ...)
x |
Point pattern on a linear network (object of class |
sigma |
Smoothing bandwidth (standard deviation of the kernel)
in the same units as the spatial coordinates of |
... |
Arguments passed to |
weights |
Optional. Numeric vector of weights associated with the
points of |
kernel |
Character string specifying the smoothing kernel.
See |
continuous |
Logical value indicating whether to compute the
“equal-split continuous” smoother ( |
epsilon |
Tolerance value. A tail of the kernel with total mass
less than |
verbose |
Logical value indicating whether to print progress reports. |
debug |
Logical value indicating whether to print debugging information. |
savehistory |
Logical value indicating whether to save the entire history of the algorithm, for the purposes of evaluating performance. |
old |
Logical value indicating whether to use the old, very slow algorithm for the equal-split continuous estimator. |
Kernel smoothing is applied to the points of x
using one of the rules described in Okabe and Sugihara (2012)
and McSwiggan et al (2016).
The result is a pixel image on the linear network (class
"linim") which can be plotted.
If continuous=TRUE (the default), smoothing is performed
using the “equal-split continuous” rule described in
Section 9.2.3 of Okabe and Sugihara (2012).
The resulting function is continuous on the linear network.
If continuous=FALSE, smoothing is performed
using the “equal-split discontinuous” rule described in
Section 9.2.2 of Okabe and Sugihara (2012). The
resulting function is not continuous.
In the default case
(where continuous=TRUE and kernel="gaussian"
and old=FALSE),
computation is performed rapidly by solving the classical heat equation
on the network, as described in McSwiggan et al (2016).
Computational time is short, but increases quadratically with sigma.
The arguments epsilon,debug,verbose,savehistory are ignored.
In all other cases, computation is performed by path-tracing
as described in Okabe and Sugihara (2012);
computation can be extremely slow, and time
increases exponentially with sigma.
There is also a method for split point patterns on a linear network
(class "splitppx") which will return a list of pixel images.
A pixel image on the linear network (object of class "linim").
Adrian Baddeley Adrian.Baddeley@curtin.edu.au and Greg McSwiggan.
McSwiggan, G., Baddeley, A. and Nair, G. (2016) Kernel density estimation on a linear network. Scandinavian Journal of Statistics, In press.
Okabe, A. and Sugihara, K. (2012) Spatial analysis along networks. Wiley.
X <- runiflpp(3, simplenet) D <- density(X, 0.2, verbose=FALSE) plot(D, style="w", main="", adjust=2) Dw <- density(X, 0.2, weights=c(1,2,-1), verbose=FALSE) De <- density(X, 0.2, kernel="epanechnikov", verbose=FALSE) Ded <- density(X, 0.2, kernel="epanechnikov", continuous=FALSE, verbose=FALSE)