IDEAS home Printed from https://ideas.repec.org/p/osf/osfxxx/3ey65_v1.html
   My bibliography  Save this paper

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

Author

Listed:
  • Donegan, Connor

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.

Suggested Citation

  • Donegan, Connor, 2021. "Building spatial conditional autoregressive (CAR) models in the Stan programming language," OSF Preprints 3ey65_v1, Center for Open Science.
  • Handle: RePEc:osf:osfxxx:3ey65_v1
    DOI: 10.31219/osf.io/3ey65_v1
    as

    Download full text from publisher

    File URL: https://osf.io/download/6154965a9c072e008703800d/
    Download Restriction: no

    File URL: https://libkey.io/10.31219/osf.io/3ey65_v1?utm_source=ideas
    LibKey link: if access is restricted and if your library uses this service, LibKey will redirect you to where you can use your library subscription to access this item
    ---><---

    References listed on IDEAS

    as
    1. Sain, Stephan R. & Cressie, Noel, 2007. "A spatial model for multivariate lattice data," Journal of Econometrics, Elsevier, vol. 140(1), pages 226-259, September.
    Full references (including those not matched with items on IDEAS)

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. Noel Cressie & Andrew Zammit-Mangion, 2016. "Multivariate spatial covariance models: a conditional approach," Biometrika, Biometrika Trust, vol. 103(4), pages 915-935.
    2. Arnab Bhattacharjee & Eduardo Castro & Taps Maiti & João Marques, 2014. "Endogenous spatial structure and delineation of submarkets: A new framework with application to housing markets," SEEC Discussion Papers 1403, Spatial Economics and Econometrics Centre, Heriot Watt University.
    3. repec:esx:essedp:767 is not listed on IDEAS
    4. Gupta, Abhimanyu, 2018. "Autoregressive spatial spectral estimates," Journal of Econometrics, Elsevier, vol. 203(1), pages 80-95.
    5. Ghulam A. Qadir & Carolina Euán & Ying Sun, 2021. "Flexible Modeling of Variable Asymmetries in Cross-Covariance Functions for Multivariate Random Fields," Journal of Agricultural, Biological and Environmental Statistics, Springer;The International Biometric Society;American Statistical Association, vol. 26(1), pages 1-22, March.
    6. Takahiro Yoshida & Morito Tsutsumi, 2018. "On the effects of spatial relationships in spatial compositional multivariate models," Letters in Spatial and Resource Sciences, Springer, vol. 11(1), pages 57-70, March.
    7. Giuseppe Arbia, 2011. "A Lustrum of SEA: Recent Research Trends Following the Creation of the Spatial Econometrics Association (2007--2011)," Spatial Economic Analysis, Taylor & Francis Journals, vol. 6(4), pages 377-395, July.
    8. Beran, Jan & Ghosh, Sucharita & Schell, Dieter, 2009. "On least squares estimation for long-memory lattice processes," Journal of Multivariate Analysis, Elsevier, vol. 100(10), pages 2178-2194, November.
    9. Ippoliti, L. & Martin, R.J. & Romagnoli, L., 2018. "Efficient likelihood computations for some multivariate Gaussian Markov random fields," Journal of Multivariate Analysis, Elsevier, vol. 168(C), pages 185-200.
    10. Li, Bo & Zhang, Hao, 2011. "An approach to modeling asymmetric multivariate spatial covariance structures," Journal of Multivariate Analysis, Elsevier, vol. 102(10), pages 1445-1453, November.
    11. Anna Gloria Billé & Samantha Leorato, 2017. "Quasi-ML estimation, Marginal Effects and Asymptotics for Spatial Autoregressive Nonlinear Models," BEMPS - Bozen Economics & Management Paper Series BEMPS44, Faculty of Economics and Management at the Free University of Bozen.
    12. Walguen Oscar & Jean Vaillant, 2021. "Cox Processes Associated with Spatial Copula Observed through Stratified Sampling," Mathematics, MDPI, vol. 9(5), pages 1-13, March.

    More about this item

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:osf:osfxxx:3ey65_v1. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: OSF (email available below). General contact details of provider: https://osf.io/preprints/ .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.