MyNixOS website logo
Description

Spatio-Temporal Disaggregation for Maps with Changing Areal Boundaries.

Tools for spatio-temporal disaggregation of areal data across multiple time points, including support for changing polygon boundaries. Implements methods for spatially aggregated log-Gaussian Cox process models with changing areal boundaries as described in Ripstein, Brown and Stafford (2026) "Spatio-Temporal Disaggregation with Changing Areal Boundaries" <doi:10.48550/arXiv.2606.25074>. Combines polygon-level observations, population rasters and optional covariate rasters to infer fine-scale spatial fields over time. Models can be efficiently fit using 'TMB' (Template Model Builder) and adaptive Gauss-Hermite quadrature for fast approximate inference or via 'tmbstan' for MCMC.

R-CMD-check Codecov test coverage

DAST (DisAggregation in Space and Time)

DAST fits spatial disaggregation models for areal data observed on maps where polygon boundaries change over time. It combines polygon responses, optional fine-scale covariates, and population rasters to infer fine-scale spatial risk surfaces.


Installation

You can install from GitHub with:


# install.packages("remotes")

remotes::install_github("nripstein/DAST")

or the development branch from


remotes::install_github("nripstein/DAST", ref = "development")

Data Requirements

  • polygon_shapefile_list: one sf polygon object per time point, with area_id and response columns by default.

  • covariate_rasters_list: optional matching list of terra::SpatRaster covariate stacks.

  • aggregation_rasters_list: optional matching list of terra::SpatRaster aggregation or population rasters; if omitted, uniform aggregation weights are used.

  • Polygon and raster inputs should use compatible coordinate reference systems and aligned raster grids within each time point.

Workflow


# polygon_list: list of sf polygon objects, one per time point

# covariate_list: optional list of terra::SpatRaster covariate stacks

# aggregation_list: optional list of terra::SpatRaster aggregation/population rasters

dat <- prepare_data_mmap(
	polygon_shapefile_list = polygon_list,
	covariate_rasters_list = covariate_list,
	aggregation_rasters_list = aggregation_list
)

fit <- disag_model_mmap(dat, engine = "AGHQ")

pred <- predict(fit)

Predictions are returned as fine-scale rate or risk surfaces. When the aggregation raster represents population or exposure, expected fine-cell counts can be obtained by multiplying the predicted surface by the matching aggregation raster.

Fitting Algorithms

It is straightforward to use the model-fitting algorithm of your choice by specifying an engine argument in disag_model_mmap().

EngineDescriptionRecommended use
AGHQApproximate Bayesian inference using Adaptive Gauss-Hermite Quadrature.Default option for fast approximate fully Bayesian inference.
TMBLaplace approximation through Template Model Builder.Fastest option, using Empirical Bayes instead of full Bayes.
MCMCNUTS algorithm implimented in tmbstan.Provides asymptotically exact posterior sampling, but is very slow; predict() is not currently implemented.

Passing Engine-Specific Arguments

Use engine.args to pass arguments specific to the fitting algorithm selected.

# AGHQ controls
fit_aghq <- disag_model_mmap(
	dat,
	engine = "AGHQ",
	engine.args = list(
		aghq_k = 2,
		optimizer = "BFGS"
	)
)

# TMB controls
fit_tmb <- disag_model_mmap(
	dat,
	engine = "TMB",
	engine.args = list(
		iterations = 1000,
		hess_control_ndeps = 1e-4
	)
)

# MCMC controls via tmbstan
fit_mcmc <- disag_model_mmap(
	dat,
	engine = "MCMC",
	engine.args = list(
		chains = 4,
		iter = 2000,
		warmup = 1000
	)
)

summary(fit_mcmc)

Citation

If you use DAST, please cite:

@misc{ripstein2026spatiotemporal,
  title         = {Spatio-Temporal Disaggregation with Changing Areal Boundaries},
  author        = {Ripstein, Noah and Brown, Patrick and Stafford, Jamie},
  year          = {2026},
  eprint        = {2606.25074},
  archivePrefix = {arXiv},
  url           = {https://arxiv.org/abs/2606.25074}
}
Metadata

Version

0.1.0

License

Unknown

Platforms (79)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    uefi
    wasip1
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-uefi
  • aarch64-windows
  • aarch64_be-none
  • arc-linux
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-linux
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • sh4-linux
  • vc4-none
  • wasm32-wasip1
  • wasm64-wasip1
  • x86_64-cygwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-uefi
  • x86_64-windows