Paper on CAR models and spatial analysis pakage

This paper introduces a couple Stan functions for fitting conditional autoregressive (CAR) models in Stan, compares with Nimble on sampling efficiency (effective samples per second), and includes a demonstration analysis of county mortality rates with censored observations:

Donegan, Connor. 2021. “Spatial Conditional Autoregressive Models in Stan.” OSF Preprints .

Something new in the paper is a method for fitting any valid CAR specification, rather than just the commonly used row-standardized weights matrix, and there are some comments on why I think that can be important for distance-based models.

The models are in the first release of the geostan R package, which I built using rstanstools. Apart from spatial models (CAR, ESF, ICAR/BYM), the package has a number of general spatial analysis tools:

Donegan, Connor (2021). geostan: Bayesian Spatial Analysis. R package Version 0.1.0 Bayesian Spatial Analysis • geostan

Some of the functions (e.g., prep_car_data) may be helpful for building custom Stan models; that’s not well documented yet, but the paper cited above provides an example.


This looks like a really useful paper on a topic that I think of as a headache (but that may be because of my own antiquity, trying to do this stuff in BUGS). Thanks for sharing!

1 Like

Looks great! Thanks for sharing!