View source: R/plot_procedure.R
| plot_procedures | R Documentation |
Produces a side-by-side plot comparing the temporal component of an original spatio-temporal point pattern with that of a permuted (or block-permuted) version. This graphical diagnostic is intended to assess the effect of temporal reordering procedures used in separability tests.
plot_procedures(
original,
permuted,
title = "Permutation",
col = c("blue", "red"),
pch = 1,
...
)
original |
A matrix or data frame with at least three columns |
permuted |
A matrix or data frame with the same structure as |
title |
Character string; title for the permuted panel. |
col |
Character vector of length 2 giving colors for the original and permuted panels. |
pch |
Plotting character passed to |
... |
Further graphical parameters passed to |
The function is commonly employed to visualize temporal permutations
generated by procedures such as sim.procedures or
block.permut, which underpin pure and block permutations-based
inference for first-order separability (see Ghorbani et al., 2021,
Section 3.2).
The function uses base R graphics to display two panels:
The temporal ordering of the original point pattern.
The temporal ordering after permutation or block permutation.
This diagnostic is particularly useful when validating permutation-based
inference procedures such as chi2.test,
dHS.test, and global.envelope.test.
The function is invoked for its side effect of producing a plot and returns no value.
Nafiseh Vafaei nafiseh.vafaei@slu.se
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.
sim.procedures,
block.permut,
dHS.test,
chi2.test
set.seed(123)
X <- cbind(x = runif(20), y = runif(20),
time = seq(0, 1, length.out = 20))
# Example: visualize pure permutation
sim_pure <- sim.procedures(X, nperm = 1, method = "pure")[[1]]
plot_procedures(X, sim_pure, title = "Pure Permutation")
# Example: visualize block permutation (requires Block_permutation)
if (requireNamespace("combinat", quietly = TRUE)) {
sim_block <- block.permut(nblocks = 4, X = X, nperm = 1)[[1]]
plot_procedures(X, sim_block, title = "Block Permutation")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.