The modification of a Bayesian spatial regression model to account for hierarchical data structure with an illustrative example using veterinary insurance claims
Veterinary epidemiological data often contain individual-level exposures and binary outcomes nested in geographical areas. Conventional mixed effects logistic regression can include an area-level random intercept but it does not explicitly model neighbourhood dependence. Spatial regression models such as Besag-York-Mollié (BYM) or BYM2 models are widely used in veterinary epidemiology. However, these models are traditionally formulated for aggregated area counts. When these models are used for risk factor analysis, covariates need to be defined at the area level, either by measuring them directly for each area or by aggregating individual-level exposures into area-level summaries. These area-level associations should not be used to support individual-level inference because of the ecological fallacy. In this work, we extended the original BYM2 model to handle multilevel data by embedding the BYM2 random effect within a mixed effects logistic regression and implemented the likelihood function in an equivalent grouped binomial form for computational efficiency. Using insurance claims data from 65248 cats in 77 cities in East China, we demonstrated how this multilevel BYM2 logistic regression model could be implemented including prior specification, diagnosed, and interpreted. This extension allows individual-level risk factor analysis while accounting for spatial dependence without reducing inference to aggregated area-level associations.
Authors
- Richard Anthony Laven (ORCID: https://orcid.org/0000-0002-8938-8595)
- M. Li
- D.A. Yang
- C. Wang
- C. Zhang
Institutions
- Nanjing Agricultural University (CN)
- Ant Group (China) (CN)
- Massey University (NZ)
Publication Details
- Journal
- Preventive Veterinary Medicine
- Published
- 2026-12-01
- DOI
- https://doi.org/10.1016/j.prevetmed.2026.107089
- Primary Topic
- Spatial and Panel Data Analysis
- Type
- article
- Field-Weighted Citation Impact
- 0.00