View source: R/dens.par.temp.R
dens.par.temp | R Documentation |
Estimates the intensity of a point process with only temporal dimension by applying an adaptive (variable bandwidth) Gaussian edge-corrected kernel smoothing.
dens.par.temp( t, dimt = 128, bw.t = NULL, ngroups.t = NULL, at = c("bins", "points") )
t |
Temporal point pattern, a vector with observations. |
dimt |
Bin vector dimension. The default is 128. |
bw.t |
Numeric vector of smoothing bandwidths for each point in t. The default is to compute bandwidths using bw.abram.temp. |
ngroups.t |
Number of groups into which the bandwidths should be partitioned and discretised. The default is the square root (rounded) of the number of points of |
at |
String specifying whether to estimate the intensity at bins points ( |
This function computes a temporally-adaptive kernel estimate of the intensity from a one-dimensional point pattern t using the partitioning technique of Davies and Baddeley (2018). The argument bw.t specifies the smoothing bandwidths to be applied to each of the points in X. It should be a numeric vector of bandwidths. Let the points of t be t_1, ..., t_n and the corresponding bandwidths σ_1,...,σ_n, then the adaptive kernel estimate of intensity at a location v is
λ(v) = ∑_{i=1}^n \frac{K(v,t_i; σ_i)}{c(t; σ_i)}
where K() is the Gaussian smoothing kernel.
The method partition the range of bandwidths into ngroups.t intervals, correspondingly subdividing the points of the pattern t
into ngroups.t sub-patterns according to bandwidth, and applying fixed-bandwidth smoothing to each sub-pattern. Specifying ngroups.t = 1
is the same as fixed-bandwidth smoothing with bandwidth sigma = median(bw.t)
.
If at = "points"
(the default), the result is a numeric vector with one entry for each data point in t
. If at = "bins"
the result is a data.frame containing the x,y coordinates of the intensity function.
Jonatan A. González
Davies, T.M. and Baddeley, A. (2018) Fast computation of spatially adaptive kernel estimates. Statistics and Computing, 28(4), 937-956.
González J.A. and Moraga P. (2018) An adaptive kernel estimator for the intensity function of spatio-temporal point processes https://arxiv.org/pdf/2208.12026.pdf
t <- rbeta(100, 1,4,0.8) tIntensity <- dens.par.temp(t, at = "bins") plot(tIntensity$x, tIntensity$y, type = "l")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.