| dHS.test | R Documentation |
Performs a nonparametric test of first-order separability between space and time in a
spatio-temporal point process using the d-variable Hilbert–Schmidt independence
criterion (dHSIC). The test statistic evaluates whether the spatio-temporal intensity \rho(u,t) can be
written in the multiplicative form \rho_1(u)\rho_2(t),\,\, (u,t)\in \mathbb{R}^2\times\mathbb{R}, where \rho_1 and \rho_2 are nonnegative measurable functions.
dHS.test(
X,
sim.procedure = c("pure_per", "block_per"),
nblocks = 7L,
nperm = 1999L,
nsim = 199L,
bandwidth = NULL
)
X |
A numeric matrix or data frame with at least three columns giving event coordinates
|
sim.procedure |
Character string specifying the permutation strategy:
|
nblocks |
Integer (>= 2). Number of temporal blocks for block permutation (only for |
nperm |
Integer (>= 1). Number of block permutations (only for |
nsim |
Integer (>= 1). Number of pure permutations (only for |
bandwidth |
Optional numeric. Fixed bandwidth to use with |
Two permutation strategies are supported:
"pure_per"Randomly permutes the time component across events.
"block_per"Uses block-wise permutation of the time component via sim.procedures
with method = "block" to preserve short-range temporal dependence.
The Monte Carlo p-value is computed with the standard +1 correction:
(1 + \#\{T_i \ge T_{obs}\})/(B + 1), where B is the number of permutations.
A list with components:
Monte Carlo p-value based on the adaptive-bandwidth Gaussian kernel.
Monte Carlo p-value based on the fixed-bandwidth Gaussian kernel, or NA if bandwidth = NULL.
Bandwidth selected by dHSIC::dhsic(..., kernel = "gaussian").
The dHSIC method is implemented via the dHSIC package. When sim.procedure = "pure_per",
dHS.test() internally calls dhsic from R package dHSIC for computational efficiency.
Ghorbani, M., Vafaei, N. and Myllymäki, M. (2025). A kernel-based test for the first-order separability of spatio-temporal point processes, TEST.
sim.procedures, block.permut, chi2.test
if (requireNamespace("dHSIC", quietly = TRUE)) {
set.seed(123)
X <- cbind(runif(100), runif(100), runif(100, 0, 10))
# Pure permutation test
result <- dHS.test(sim.procedure = "pure_per",
X = X, nsim = 199, bandwidth = 0.05)
print(result$p.value)
# Block permutation test
result_block <- dHS.test(sim.procedure = "block_per", X = X,
nblocks = 5, nperm = 100, bandwidth = 0.05)
print(result_block$p.value.bw)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.