Spatial Generalised Linear Mixed Models for Areal Unit Data

Implements a class of univariate and multivariate spatial generalised linear mixed models for areal unit data, with inference in a Bayesian setting using Markov chain Monte Carlo (MCMC) simulation. The response variable can be binomial, Gaussian, multinomial, Poisson or zero-inflated Poisson (ZIP), and spatial autocorrelation is modelled by a set of random effects that are assigned a conditional autoregressive (CAR) prior distribution. A number of different models are available for univariate spatial data, including models with no random effects as well as random effects modelled by different types of CAR prior, including the BYM model (Besag et al. (1991) ), the Leroux model (Leroux et al. (2000) ) and the localised model (Lee et al. (2015) ). Additionally, a multivariate CAR (MCAR) model for multivariate spatial data is available, as is a two-level hierarchical model for modelling data relating to individuals within areas. Full details are given in the vignette accompanying this package. The initial creation of this package was supported by the Economic and Social Research Council (ESRC) grant RES-000-22-4256, and on-going development has been supported by the Engineering and Physical Science Research Council (EPSRC) grant EP/J017442/1, ESRC grant ES/K006460/1, Innovate UK / Natural Environment Research Council (NERC) grant NE/N007352/1 and the TB Alliance.


Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


5.1.3 by Duncan Lee, 2 months ago

Report a bug at

Browse source code at

Authors: Duncan Lee

Documentation:   PDF Manual  

Task views: Analysis of Spatial Data

GPL (>= 2) license

Imports CARBayesdata, coda, leaflet, matrixcalc, MCMCpack, rgdal, sp, spam, spdep, stats, truncnorm, utils

Depends on MASS, Rcpp

Suggests boot, deldir, foreign, grid, maptools, Matrix, nlme, shapefiles, splines

Linking to Rcpp

Enhanced by emmeans.

See at CRAN