Learn R Programming

⚠️There's a newer version (6.1.1) of this package.Take me there.

CARBayes (version 5.2)

Spatial Generalised Linear Mixed Models for Areal Unit Data

Description

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.

Copy Link

Version

Install

install.packages('CARBayes')

Monthly Downloads

1,004

Version

5.2

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Maintainer

Duncan Lee

Last Published

March 13th, 2020

Functions in CARBayes (5.2)

CARBayes-package

Spatial Generalised Linear Mixed Models for Areal Unit Data
S.CARlocalised

Fit a spatial generalised linear mixed model to data, where a set of spatially smooth random effects are augmented with a piecewise constant intercept process.
print.CARBayes

Print a summary of a fitted CARBayes model to the screen.
S.CARleroux

Fit a spatial generalised linear mixed model to data, where the random effects have a Leroux conditional autoregressive prior.
S.CARdissimilarity

Fit a spatial generalised linear mixed model to data, where the random effects have a localised conditional autoregressive prior.
summarise.lincomb

Compute the posterior distribution for a linear combination of the covariates from the linear predictor.
S.CARbym

Fit a spatial generalised linear mixed model to data, where the random effects have a BYM conditional autoregressive prior.
summarise.samples

Summarise a matrix of Markov chain Monte Carlo samples.
MVS.CARleroux

Fit a multivariate spatial generalised linear mixed model to data, where the random effects are modelled by a multivariate conditional autoregressive model.
residuals.CARBayes

Extract the residuals from a model.
combine.data.shapefile

Combines a data frame with a shapefile to create a SpatialPolygonsDataFrame object.
coef.CARBayes

Extract the regression coefficients from a model.
highlight.borders

Creates a SpatialPoints object identifying a subset of borders between neighbouring areas.
fitted.CARBayes

Extract the fitted values from a model.
S.CARmultilevel

Fit a spatial generalised linear mixed model to multi-level areal unit data, where the spatial random effects have a Leroux conditional autoregressive prior and there are also individual or small group level random effects.
S.glm

Fit a generalised linear model to data.
logLik.CARBayes

Extract the estimated loglikelihood from a fitted model.
model.matrix.CARBayes

Extract the model (design) matrix from a model.