Learn R Programming

kernstadapt (version 0.4.0)

dens.par.temp: Adaptive kernel estimate of intensity of a temporal point pattern

Description

Estimates the intensity of a point process with only temporal dimension by applying an adaptive (variable bandwidth) Gaussian edge-corrected kernel smoothing.

Usage

dens.par.temp(
  t,
  dimt = 128,
  bw.t = NULL,
  ngroups.t = NULL,
  at = c("bins", "points")
)

Value

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.

Arguments

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 t.

at

String specifying whether to estimate the intensity at bins points (at = "bins") or only at the points of t (at = "points").

Author

Jonatan A. González

Details

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 \(\sigma_1,...,\sigma_n\), then the adaptive kernel estimate of intensity at a location \(v\) is $$\lambda(v) = \sum_{i=1}^n \frac{K(v,t_i; \sigma_i)}{c(t; \sigma_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).

References

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 http://arxiv.org/pdf/2208.12026

Examples

Run this code
t <- rbeta(100, 1,4,0.8)
tIntensity <- dens.par.temp(t, at = "bins")
plot(tIntensity$x, tIntensity$y, type = "l")

Run the code above in your browser using DataLab