The BMEmapping R package delivers a flexible, robust, and computationally optimized framework for spatial interpolation and uncertainty quantification using the Bayesian Maximum Entropy (BME) paradigm. Unlike traditional kriging frameworks that rely strictly on precise physical measurements (hard data), BMEmapping allows for the systematic integration of bounded uncertainty domains (soft-interval data) without resorting to linear or Gaussian assumptions.
The package features two operational geostatistical engines:
- Classical BME (CBME): Integrates structural general-knowledge via user-defined theoretical variogram parameters.
- Quantile-Based BME (QBME): Bypasses manual variogram fitting by internally constructing an ensemble of localized, quantile-specific variogram structures to capture spatial continuity adaptively across different levels of the data distribution.
Installation
You can install the development version of BMEmapping from
GitHub using devtools:
# install.packages("devtools") devtools::install_github("KinsprideDuah/BMEmapping")
Core Functions
Data Pipeline Configuration
bme_mapConstructs a unified data object encapsulating coordinate structures, spatial attributes, hard measurements, and soft-interval constraints to condition the interpolation space.
Posterior Density Estimation
prob_zkComputes posterior densities using the CBME approach.q_prob_zkComputes posterior densities using the QBME approach.
Probabilistic Spatial Prediction & Uncertainty Estimation
bme_predictComputes spatial point estimates (mean, median, or mode) using the CBME approach.q_bme_predictComputes spatial point estimates (mean, median, or mode) using the QBME approach.bme_predict_ciConstructs credible intervals using the CBME approach.q_bme_predict_ciConstructs credible intervals using the QBME approach.
Model Validation & S3 Graphics
bme_cvExecutes K-fold or exact Leave-One-Out Cross-Validation (LOOCV) at hard data locations using the CBME approach.q_bme_cvExecutes K-fold or exact LOOCV at hard data locations using the QBME approach.summary()Provides standard geostatistical error metrics for BMEmapping objects.plot()Provides graphical visualzations (spatial, prediction and residual plots) of BMEmapping objects.
Getting Help
If you encounter a bug or have structural feature requests, please file a ticket alongside a minimal reproducible example (reprex) on the GitHub Issues page.
Author
Kinspride Duah
License
MIT + file LICENSE