Bayesian Latent Gaussian Modelling using INLA and Extensions

Facilitates spatial and general latent Gaussian modeling using integrated nested Laplace approximation via the INLA package (<>). Additionally, extends the GAM-like model class to more general nonlinear predictor expressions, and implements a log Gaussian Cox process likelihood for modeling univariate and spatial point processes based on ecological survey data. Model components are specified with general inputs and mapping methods to the latent variables, and the predictors are specified via general R expressions, with separate expressions for each observation likelihood model in multi-likelihood models. A prediction method based on fast Monte Carlo sampling allows posterior prediction of general expressions of the latent variables. Ecology-focused introduction in Bachl, Lindgren, Borchers, and Illian (2019) .

Build Status CRAN_Status_Badge

The goal of inlabru is to facilitate spatial modeling using integrated nested Laplace approximation via the R-INLA package. Additionally, implements a log Gaussian Cox process likelihood for modeling univariate and spatial point processes based on ecological survey data. See Yuan Yuan, Fabian E. Bachl, Finn Lindgren, David L. Borchers, Janine B. Illian, Stephen T. Buckland, Havard Rue, Tim Gerrodette (2017), arXiv.


You can install the current CRAN version of inlabru:


You can install the latest bugfix release of inlabru from GitHub with:

devtools::install_github("fbachl/inlabru", ref="master")

You can install the development version of inlabru from GitHub with:

# install.packages("devtools")
devtools::install_github("fbachl/inlabru", ref="devel")


This is a basic example which shows you how to solve a common problem:

## basic example code


inlabru 2.1.9

  • Remove unused VignetteBuilder entry from DESCRIPTION

inlabru 2.1.8

  • Update default options

  • Prevent int.polygon from integrating outside the mesh domain, and generally more robust integration scheme construction.

  • Fix bru() to like() parameter logic. (Thanks to Peter Vesk for bug example)

inlabru 2.1.7

  • Added a file to track changes to the package.

  • Added inla methods for predict() and generate() that convert inla output into bru objects before calling the bru prediction and posterior sample generator.

  • Added protection for examples requiring optional packages

  • Fix sample.lgcp output formatting, extended CRS support, and more efficient sampling algorithm

  • Avoid dense matrices for effect mapping

inlabru 2.1.4

  • iinla() tracks convergence of both fixed and random effects

inlabru 2.1.3

  • Added matrix geom gg.matrix()

  • Fixed CRAN test issues

Reference manual

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


2.3.1 by Finn Lindgren, 7 months ago,

Report a bug at

Browse source code at

Authors: Finn Lindgren [aut, cre, cph] , Finn Lindgren continued development of the main code) , Fabian E. Bachl [aut, cph] (Fabian Bachl wrote the main code) , David L. Borchers [ctb, dtc, cph] (David Borchers wrote code for Gorilla data import and sampling , multiplot tool) , Daniel Simpson [ctb, cph] (Daniel Simpson wrote the basic LGCP sampling method) , Lindesay Scott-Howard [ctb, dtc, cph] (Lindesay Scott-Howard provided MRSea data import code) , Seaton Andy [ctb] (Andy Seaton provided testing and bugfixes)

Documentation:   PDF Manual  

GPL (>= 2) license

Imports Matrix, rgdal, rgeos, utils, withr

Depends on ggplot2, methods, sp, stats

Suggests covr, dplyr, ggmap, ggpolypath, graphics, INLA, knitr, maptools, mgcv, patchwork, raster, RColorBrewer, rgl, rmarkdown, shiny, sn, spatstat.geom, spatstat.core,, spatstat, sphereplot, testthat

See at CRAN