Spatial Generalised Linear Mixed Models for Areal Unit Data
Overview
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 using a single or multiple Markov chains. 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, doi:10.1007/BF00116466) and Leroux model (Leroux et al., 2000, doi:10.1007/978-1-4612-1284-3_4). 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.
Install
Health
NOTECRAN incoming feasibilityr-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc
Maintainer: ‘Duncan Lee <Duncan.Lee@glasgow.ac.uk>’
No Authors@R field in DESCRIPTION.
Please add one, modifying
Authors@R: person(given = "Duncan",
family = "Lee",
role = c("aut", "cre"),
email = "duncan.lee@glasgow.ac.uk")
as necessary.- NOTE11 OK, 2 NOTE2026-06-09
- ERROR11 OK, 1 NOTE, 1 ERROR2026-06-08
- NOTE12 OK, 2 NOTE2026-04-22
- ERROR11 OK, 2 NOTE, 1 ERROR2026-04-18
- NOTE12 OK, 2 NOTE2026-03-10
Documentation
- Help pages
- 15includes a package overview page
- Examples that run
- 80%8 run in a plain check · 2 hold no code
- Exported functions with examples
- 100%
- Documented parameters
- 100%
- Return-value docs
- 100%
- Help pages citing references
- 47%
Downloads
Repository
- PRs merged (all time)
- not measured
- Median days to close, 50 most recently updated closed issues
- 0
- Median days to close, 50 most recently updated closed PRs
- not measured
Stars over time
Forks over time
Issues over time
PRs over time
1 development-tooling and community-health practice detected across 1 family in the upstream repository
Checks run against github.com/duncanplee/carbayes on 2026-10-21.
Dependencies
Installing CARBayes adds 115 packages (64 with compiled code, 117 MB of source tarballs). Heaviest: stringi 11 MB, sf 9.3 MB, ggplot2 6.0 MB.
Code & Tests
People & History
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- 6.1.1Latest
- 6.1
- 6.02023-08-09 · diff ↗
- RR 4.3.0 released · 2023-04-21
- 5.3
- RR 4.2.0 released · 2022-04-22
- 5.2.52021-09-30 · diff ↗
- 5.2.42021-05-31 · diff ↗
- RR 4.1.0 released · 2021-05-18
- 5.2.32021-02-03 · diff ↗
- 5.2.22021-01-15 · diff ↗
- RR 4.0.0 released · 2020-04-24
- 5.22020-03-13 · diff ↗
Show 37 earlier eventsHide 37 earlier events
- 5.1.32019-12-12 · diff ↗
- 5.1.22019-06-21 · diff ↗
- RR 3.6.0 released · 2019-04-26
- 5.1.12018-12-06 · diff ↗
- 5.12018-09-10 · diff ↗
- RR 3.5.0 released · 2018-04-23
- 5.0
- RR 3.4.0 released · 2017-04-21
- 4.72017-02-01 · diff ↗
- 4.62016-06-08 · diff ↗
- 4.5
- RR 3.3.0 released · 2016-05-03
- 4.4
- 4.32015-09-16 · diff ↗
- 4.2
- RR 3.2.0 released · 2015-04-16
- 4.1
- 4.02014-12-16 · diff ↗ ·
removed 7 exports
bymCAR.re, clusterCAR.re, dissimilarityCAR.re, iarCAR.re, independent.re, lerouxCAR.re, properCAR.readded 8 exports
S.CARbym, S.CARcluster, S.CARdissimilarity, S.CARiar, S.CARleroux, S.independent, summarise.lincomb, summarise.samples - RR 3.1.0 released · 2014-04-10
- 3.0.32013-12-03 · diff ↗
- 3.0.22013-08-13 · diff ↗
- 3.0.12013-05-06 · diff ↗
- 3.02014-04-04 · diff ↗ ·
removed 18 exports
poisson.independent, poisson.iarCAR, poisson.lerouxCAR, poisson.properCAR, poisson.bymCAR, poisson.dissimilarityCAR, gaussian.independent, gaussian.iarCAR, gaussian.lerouxCAR, gaussian.properCAR, gaussian.bymCAR, gaussian.dissimilarityCAR, binomial.independent, binomial.iarCAR, binomial.lerouxCAR, binomial.properCAR, binomial.bymCAR, binomial.dissimilarityCARadded 7 exports
bymCAR.re, clusterCAR.re, dissimilarityCAR.re, iarCAR.re, independent.re, lerouxCAR.re, properCAR.re - RR 3.0.0 released · 2013-04-03
- 2.15.32013-02-19 · diff ↗ ·
removed 12 exports
poisson.dissimilarityCARbinary, poisson.dissimilarityCARcontinuous, poisson.priorWCAR, gaussian.dissimilarityCARbinary, gaussian.dissimilarityCARcontinuous, gaussian.priorWCAR, binomial.dissimilarityCARbinary, binomial.dissimilarityCARcontinuous, binomial.priorWCAR, geary.permutation, moran.permutation, W.prior.elicitadded 5 exports
poisson.dissimilarityCAR, gaussian.dissimilarityCAR, binomial.dissimilarityCAR, combine.data.shapefile, highlight.borders - 2.15.22012-08-27 · diff ↗
- 2.15.12012-06-20 · diff ↗
- 2.02013-12-04 · diff ↗
- 1.6
- 1.52013-09-02 · diff ↗
- 1.42013-05-06 · diff ↗
- 1.32013-03-05 · diff ↗
- 1.22012-10-31 · diff ↗
- 1.12012-08-27 · diff ↗ ·
removed 6 exports
poisson.localisedbinaryCAR, poisson.localisedcontinuousCAR, gaussian.localisedbinaryCAR, gaussian.localisedcontinuousCAR, binomial.localisedbinaryCAR, binomial.localisedcontinuousCARadded 11 exports
poisson.dissimilarityCARbinary, poisson.dissimilarityCARcontinuous, poisson.priorWCAR, gaussian.dissimilarityCARbinary, gaussian.dissimilarityCARcontinuous, gaussian.priorWCAR, binomial.dissimilarityCARbinary, binomial.dissimilarityCARcontinuous, binomial.priorWCAR, geary.permutation, W.prior.elicit - RR 2.15.0 released · 2012-03-30
- 1.02012-03-27
- RR 2.14.0 released · 2011-10-31
Package metadata
- First published
- 2012-03-27
- Total releases
- 37 / 14 yrs
- License
- GPL (>= 2) OSI
- Minimum R
- ≥ 3.5.0
- Download size
- 4.3 MB
Cite
Cite this package
Run in R for the authors' entry:
citation("CARBayes")The package provides a citation file, so citation() returns the authors' own entry.
It points to 10.18637/jss.v055.i13.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-23, which the citation names so these numbers can be found later. More on citing and the projects behind them.