Spatial Point Pattern Test for Areal Data

Implements the area-based nonparametric spatial point pattern test of Andresen (2009) for comparing two spatial distributions of events aggregated to areal units, with the applications and extensions reviewed in Andresen (2016) . Unit-level inference uses bounded Monte Carlo bootstrap p-values, with marginal confidence interval overlap retained as an option. Global similarity is summarised by the robust S index, accompanied by a test of whether two patterns are more different than two realisations of a single process, and a test of the spatial arrangement of the differences. A longitudinal extension compares each period of a time series against a base period and classifies unit-level trajectories. Publication-ready maps can be redrawn with user-chosen layouts.


sppt

Spatial point pattern test for areal data.

sppt compares spatial distributions of events aggregated to areal units, such as crimes counted by census tract.

  • sppt() compares two patterns unit by unit with bounded Monte Carlo bootstrap p-values, and summarises the map with the robust S index, a sameness test and a test of the spatial arrangement of the differences.
  • sppt_longitudinal() compares every period of a time series with the first and classifies each unit's trajectory.
  • sppt_sameness() tests an S index against sameness.
  • sppt_map() redraws the maps from either analysis with a chosen layout.

Installation

install.packages("sppt")

Example

library(sppt)

res <- sppt(vancouver_ct, group_col = "id",
            count_col = c("BNER2003", "BNER2025"), seed = 42)
summary(res)
sppt_map(res, "pvalue", legend_position = "right")

long <- sppt_longitudinal(vancouver_ct, group_col = "id",
                          count_col = paste0("BNER", 2003:2025), seed = 42)

See vignette("sppt") and vignette("sppt_longitudinal").

References

Andresen, M.A. (2009). Testing for similarity in area-based spatial patterns: A nonparametric Monte Carlo approach. Applied Geography, 29(3), 333-345. https://doi.org/10.1016/j.apgeog.2008.12.004

Andresen, M.A. (2016). An area-based nonparametric spatial point pattern test: The test, its applications, and the future. Methodological Innovations, 9, Article 12. https://doi.org/10.1177/2059799116630659

Andresen, M.A. (2026). Testing longitudinal change in spatial distributions and patterns: An extension of the spatial point pattern test. Annals of the American Association of Geographers, in press.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("sppt")

1.0.0 by Martin A. Andresen, 14 hours ago


Browse source code at https://github.com/cran/sppt


Authors: Martin A. Andresen [aut, cre, cph] (ORCID:


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports classInt, ggplot2, ggspatial, graphics, grDevices, Matrix, rlang, scales, sf, spdep, stats, tools, utils

Suggests knitr, rmarkdown, testthat


See at CRAN