EconPapers    
Economics at your fingertips  
 

Building spatial conditional autoregressive (CAR) models in the Stan programming language

Connor Donegan

No 3ey65_v1, OSF Preprints from Center for Open Science

Abstract: Modeling data collected by areal units, such as counties or census tracts, is a core component of population health research and of growing interest to the social sciences. Bayesian inference has both practical and philosophical advantages over classical statistical techniques, and advances in Markov chain Monte Carlo (MCMC) are expanding the range of research questions to which Bayesian inference may be applied. This code snippet introduces code for fitting spatial conditional autoregressive (CAR) models with the Stan modeling language. Stan is an expressive programming language that uses a dynamic Hamiltonian Monte Carlo (HMC) algorithm to draw samples from user-specified probability models. This paper discusses various CAR model specifications and introduces computationally efficient implementations for Stan users. The geostan R package provides, among other things, convenience functions to ease the process of building custom spatial models in Stan. The paper demonstrates use of the code by modeling United States county, age- and sex-specific mortality data, including censored observations. The demonstration highlights the importance of thoughtful analysis of model residuals.

Date: 2021-09-29
References: View references in EconPapers View complete reference list from CitEc
Citations:

Downloads: (external link)
https://osf.io/download/6154965a9c072e008703800d/

Related works:
This item may be available elsewhere in EconPapers: Search for items with the same title.

Export reference: BibTeX RIS (EndNote, ProCite, RefMan) HTML/Text

Persistent link: https://EconPapers.repec.org/RePEc:osf:osfxxx:3ey65_v1

DOI: 10.31219/osf.io/3ey65_v1

Access Statistics for this paper

More papers in OSF Preprints from Center for Open Science
Bibliographic data for series maintained by OSF ().

 
Page updated 2025-04-05
Handle: RePEc:osf:osfxxx:3ey65_v1