R Package · INLA · Spatial Statistics

fbesag

A non-stationary extension of the classical Besag model for Bayesian disease mapping and spatial smoothing over heterogeneous sub-regions.

About

fbesag is a flexible, non-stationary spatial random effects model built on top of the INLA framework. It extends the classical Besag (ICAR) model by allowing the precision parameter to vary across sub-regions, making it well-suited for modeling spatially heterogeneous phenomena such as disease risk or environmental exposures.

Non-stationary

Precision varies across spatial sub-regions, capturing local heterogeneity.

INLA native

Fully compatible with the R-INLA framework via the cgeneric interface.

Disease mapping

Applied to public health surveillance across irregular areal domains.

Installation

Option 1 Install via devtools Recommended

Install directly from GitHub. Requires a working R toolchain and the devtools package.

library("devtools")
install_github("esmail-abdulfattah/fbesag")

If this fails, run run_fbesag_option_1.R from the inst/ folder.

Option 2 Compile the shared library yourself

Download cgeneric.h and fbesag.c from inst/, then compile:

Linux
gcc -Wall -fpic -g -O -c -o fbesag.o fbesag.c
gcc -shared -o fbesag.so fbesag.o
Windows
gcc -Wall -fpic -g -O -c -o fbesag.o fbesag.c
gcc -shared -o fbesag.dll fbesag.o

Then run wrapper.R from inst/. On Windows, replace fbesag.so with fbesag.dll inside get_fbesag().

Option 3 Pure R fallback

No compilation required. Slightly slower than the C backend, but works on any platform. Run run_fbesag_option_2.R from the inst/ folder.

Publication

Statistical Methods in Medical Research · 2024

Non-stationary Bayesian spatial model for disease mapping based on sub-regions

Esmail Abdul Fattah et al.

View Article

Applications

fbesag has been applied to disease mapping in Brazil and is suitable for:

Collaborate

We are actively looking for collaborators interested in:

Extending fbesag to BYM2 and spatio-temporal models
Applications in environmental, social, or epidemiological sciences
Developing flexible spatial priors within the INLA ecosystem

Contact

Esmail Abdul Fattah

King Abdullah University of Science and Technology (KAUST)

esmail.abdulfattah@kaust.edu.sa