spStack: Practical Bayesian Geostatistics Using Predictive Stacking in R

Preprint, 2024

Statistical modeling and analysis for spatially oriented point-referenced outcomes play a crucial role in diverse scientific applications such as earth and environmental sciences, ecology, epidemiology, and economics. With the advent of Markov chain Monte Carlo (MCMC) algorithms, Bayesian hierarchical models have gained massive popularity in analyzing such point-referenced or, geostatistical data. However, these models involve latent spatial processes characterized by spatial process parameters, which besides lacking substantive relevance in scientific contexts, are also weakly identified and hence, impedes convergence of MCMC algorithms. Thus, even for moderately sized datasets, the computation for MCMC becomes too onerous for practical use. In this article, we introduce the R package spStack that delivers fast Bayesian inference for a class of geostatistical models, where we obviate these issues by sampling from analytically available posterior distributions conditional upon candidate values of the spatial process parameters and, subsequently assimilate inference from these individual posterior distributions using Bayesian predictive stacking. Besides delivering competitive predictive performance as compared to fully Bayesian inference using MCMC, our proposed algorithm is executable in parallel, thus drastically improving runtime and elevating the utility of our software to a diverse group of practitioners with limited computational resources at their disposal.

# install the package from CRAN
install.packages("spStack")

# load library
library("spStack")

# see documentations of some core functions
help(spLMstack)          ## Gaussian spatial model
help(spGLMstack)         ## Non-Gaussian spatial models

See the standalone script spStack-code.R in order to reproduce the examples in the manuscript.

Recommended citation:

Pan, S. & Banerjee, S. (2024). "spStack: Practical Bayesian Geostatistics Using Predictive Stacking in R."
Download Citation | DOI