MyNixOS website logo
Description

Discrete Log-Gaussian Cox Processes for Aggregated Disease Counts.

Fits a spatially discrete approximation to a log-Gaussian Cox process model for spatially aggregated disease count data, estimated by Monte Carlo Maximum Likelihood as in Christensen (2004) <doi:10.1198/106186004X2525> and Johnson, Diggle and Giorgi (2019) <doi:10.1002/sim.8339>. Performance-critical steps (aggregated correlation assembly, Metropolis-adjusted Langevin algorithm (MALA) sampling, the Monte Carlo likelihood, and the Kronecker-structured space-time likelihood) are implemented in C++ via 'RcppArmadillo'. Provides a one-line, 'glm'-like interface and statistical extensions including a nugget term, general 'Matern' smoothness, raster and misaligned covariates, restricted spatial regression, importance-sampling diagnostics and re-anchored Monte Carlo maximum likelihood (MCML).

SDALGCP2

R-CMD-check pkgdown

Fast, modern disease mapping. SDALGCP2 fits a spatially discrete approximation to a log-Gaussian Cox process (SDA-LGCP) to spatially aggregated disease counts, with a one-line, glm-like interface and C++ speed. The method is described in Johnson, Diggle & Giorgi (2019, Statistics in Medicine, doi:10.1002/sim.8339).

Installation

# install.packages("remotes")
remotes::install_github("olatunjijohnson/SDALGCP2")

You need a C++ toolchain (Rtools on Windows, Xcode CLT on macOS) because the performance-critical kernels are compiled.

Quick start — one line to fit

data is an sf object whose columns hold the response, covariates and offset. Everything else (candidate-point spacing, the spatial scale, MCMC settings) is chosen automatically.

library(SDALGCP2)

fit <- sdalgcp(cases ~ deprivation + offset(log(population)), data = regions)

summary(fit)              # glm-style coefficient table + spatial parameters
rr  <- predict(fit)       # an sf: relative_risk, relative_risk_se, adjusted_rr, adjusted_rr_se
plot(fit)                 # relative-risk map
plot(fit, "exceedance", threshold = 1.5)   # hotspot probabilities

That is the whole workflow. The same sdalgcp() call also covers:

You want…Add…
raster (continuous) covariatesrasters = my_raster (enter on the intensity scale)
a spatio-temporal modeltime = "year"
population-weighted aggregationpopden = pop_raster

What you get

Relative riskUncertainty (SD)Exceedance P(RR > 1.5)Continuous surface

Why SDALGCP2

  • Easy:sdalgcp(formula, data) — feels like glm(); sensible defaults so a first fit needs no tuning.
  • Fast: aggregated correlation assembly, the MALA sampler and the Monte Carlo likelihood run in C++ (RcppArmadillo + OpenMP) — 8–10× faster end-to-end than the original, returning the same estimates (see Performance).
  • Grid-free scale: the spatial scale φ is optimised continuously by default (no grid), with a proper standard error — see the derivation PDF.
  • Continuous covariates done right: rasters enter on the intensity scale (log-sum-exp), not by averaging predictors over polygons — see the raster PDF.
  • Spatio-temporal without ever forming the (N·T)² covariance.
  • Honest uncertainty: re-anchored Monte Carlo likelihood, importance-sampling diagnostics, a nugget term, model checking (residual Moran's I).

Tutorials

See the package website for worked, reproducible articles:

  • Spatial disease mapping — the full workflow end to end.
  • Raster predictors — intensity-scale covariates vs naive areal averaging.
  • Spatio-temporal — space-time relative risk.
  • Estimating the scale — grid (scale = "grid") vs continuous (scale = "continuous") φ.

Reference

Johnson, O., Diggle, P. & Giorgi, E. (2019). A spatially discrete approximation to log-Gaussian Cox processes for modelling aggregated disease count data. Statistics in Medicine 38, 4871–4887. \doi{10.1002/sim.8339}

Metadata

Version

0.1.1

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