estimate.st.intensity: Kernel Estimation of the Spatio-Temporal Intensity Function...

View source: R/Estimate_st_intensity.R

estimate.st.intensityR Documentation

Kernel Estimation of the Spatio-Temporal Intensity Function and Its Components, and Test Statistics for First-Order Separability

Description

It returns estimates of the full spatio-temporal intensity together with its spatial and temporal marginal components. The output also includes the test statistic S(u,t) and its spatial and temporal marginal profiles S_{\mathrm{space}}(u) and S_{\mathrm{time}}(t) (equations (11)–(13) in Ghorbani et al., 2021), as well as several deviation tests (e.g., equation (15) in Ghorbani et al., 2021) that quantify departures from first-order separability.

Usage

estimate.st.intensity(
  X,
  s.region,
  t.region,
  at = c("pixels", "points"),
  n.grid = c(25, 25, 20)
)

Arguments

X

A numeric matrix with three columns giving the event coordinates (x, y, and t).

s.region

A numeric matrix with two columns defining the polygonal boundary of the spatial observation region.

t.region

A numeric vector of length 2 specifying the temporal observation window.

at

Character string; either "pixels" to estimate intensity on a spatio-temporal grid or "points" to compute the estimates at observed event locations.

n.grid

A numeric vector of length 3 giving the number of grid cells in the x, y, and t dimensions. Required when at = "pixels".

Details

The estimation follows the kernel framework of Ghorbani et al. (2021). A Gaussian kernel is applied in each spatial and temporal dimension. Spatial bandwidths are estimated using Diggle’s method, and the temporal bandwidth is obtained by the Sheather–Jones direct plug-in (SJ-DPI) approach (see calc.bandwidths.and.edgecorr for implementation details). Edge corrections and bandwidths are computed using the calc.bandwidths.and.edgecorr.

The non-separable intensity estimate is

\hat{\rho}(u,t) = \sum_{i=1}^n \frac{K_\epsilon^2\!\left(u-u_i\right)}{C_{W,\epsilon}(u_i)} \frac{K_\delta^1\!\left(t-t_i\right)}{C_{T,\delta}(t_i)},

where k_b(v) = k(v/b)/b^d is a d-dimensional kernel with bandwidth b > 0, and K^1 and K^2 are Gaussian kernels with spatial and temporal bandwidths \epsilon and \delta. C_{W,\epsilon}(u_i) and C_{T,\delta}(t_i) are spatial and temporal edge corrections, respectively. For estimate of the separable counterparts and more details see equations (3)-(5) in Ghorbani et al., 2021).

The separability test is:

S(u, t) = \frac{\hat \rho(u, t)}{\hat\rho_{\mathrm{space}}(u)\hat\rho_{\mathrm{time}}(t)/n},

where n is the number of observed points.

Several deviation statistics are provided to quantify departures from separability

  • deviation.t1: Integral of absolute deviations \int_{W\times T}|\hat\rho(u,t) - \hat\rho_{\mathrm{sep}}(u,t)|\mathrm{d}u\mathrm{d}t.

  • deviation.t2: Integral of absolute deviation of inverse intensities \int_{W\times T}|1/\hat\rho(u,t) - 1/\hat\rho_{\mathrm{sep}}(u,t)|\mathrm{d}u\mathrm{d}t.

  • deviation.t3: Sum of log-ratio deviations \sum_i\big(\log(\hat\rho(u_i,t_i)- \log(\hat\rho_{\mathrm{sep}}(u_i,t_i))\big).

  • deviation.t4: Integral of the S-function.

When at = "points", intensities and diagnostics are evaluated at the observed event locations.

Value

A list containing:

x, y, t

Grid vectors for x, y, and t (returned only when at = "pixels").

epsilon

Estimated spatial bandwidth used in Gaussian kernels.

delta

Estimated temporal bandwidth.

SPat.intens

Estimated spatial intensity surface (pixels only).

TeM.intens

Estimated temporal intensity profile (pixels only).

sep.intens

Separable spatio-temporal intensity estimate.

nonsep.intens

Non-separable spatio-temporal intensity estimate.

S.fun

Test function S(u,t) as the ratio of non-separable to separable intensity estimates.

S.space

Marginal sum of S(u,t) over time (space profile).

S.time

Marginal sum of S(u,t) over space (time profile).

deviation.t1

Deviation statistic: Integral of absolute deviations.

deviation.t2

Deviation statistic: absolute deviation of inverse intensities.

deviation.t3

Deviation statistic: sum of log-ratio deviations.

deviation.t4

Total integral of the S-function.

Author(s)

Mohammad Ghorbani mohammad.ghorbani@slu.se
Nafiseh Vafaei nafiseh.vafaei@ltu.se

References

Ghorbani M., Vafaei N., Dvořák J., Myllymäki M. (2021). Testing the first-order separability hypothesis for spatio-temporal point patterns. Computational Statistics & Data Analysis, 161, 107245.

See Also

calc.bandwidths.and.edgecorr, global.envelope.test, chi2.test, dHS.test

Examples


set.seed(123)
X <- cbind(runif(100), runif(100), runif(100, 0, 10))
s.region <- matrix(c(0, 0, 1, 0, 1, 1, 0, 1), ncol = 2, byrow = TRUE)
t.region <- c(0, 10)
result <- estimate.st.intensity(X, s.region, t.region, at = "pixels", n.grid = c(64, 64, 32))
str(result$S.fun)
image(result$S.fun[,,5], main = "S-function slice at t[5]",
       col = topo.colors(50))
contour(result$S.fun[,,5], add=TRUE)
str(result[c("deviation.t1","deviation.t3","deviation.t4")])



SepTest documentation built on Feb. 3, 2026, 5:07 p.m.