Skip to main content Accessibility help
×
Hostname: page-component-8448b6f56d-mp689 Total loading time: 0 Render date: 2024-04-23T09:21:09.075Z Has data issue: false hasContentIssue false

Appendix A - Bayesian Modeling using INLA

Published online by Cambridge University Press:  11 May 2017

Joseph M. Hilbe
Affiliation:
Jet Propulsion Laboratory, California Institute of Technology
Rafael S. de Souza
Affiliation:
Eötvös Loránd University, Budapest
Emille E. O. Ishida
Affiliation:
Université Clermont-Auvergne (Université Blaise Pascal), France
Get access

Summary

The methodology of integrated nested Laplace approximation (INLA) is based on sampling, but not on MCMC. The package can be downloaded directly from the developer's web site, www.math.ntnu.no/inla/givemeINLA.R.

The INLA package was initially developed by Rue et al. (2009). The authors have continued to develop and maintain the software, which supports Bayesian generalized linear models (GLMs), generalized additive models (GAMs), smoothing spline models, state space models, semiparametric regression, spatial and spatio-temporal models, log-Gaussian Cox processes, and geostatistical and geoadditive models.

The key to INLA is that the method is based on directly computing accurate approximations of the posterior marginals. Instead of using MCMC sampling, which can sometimes take hours, and even days, to estimate the posterior means, INLA can estimate posteriors in just a few seconds. The stated goal of the developers has been to provide researchers with criteria for model comparison as well as a variety of predictive measures. Being able to execute Bayesian modeling much faster than when using MCMC has also been a goal.

The INLA package has been used foremost by statisticians in implementing Bayesian models for a wide range of data situations and to provide the analyst with a simplified means to develop generalized additive models using a number of different types of smoothers. Ecologists have in particular been using INLA for spatial and spatial-temporal analysis. It is in this respect that INLA can be beneficial to future astrostatistical research.

We shall provide a simple example of a Bayesian negative binomial, using the same synthetic data as in Chapter 6. Readers may compare the results given there with the model output displayed below. The INLA negative binomial, using the nbinomial distribution, employs an indirect relationship between the mean and dispersion parameters. Simply invert the dispersion to obtain the direct value.

This is an R package which can be directly installed and loaded using the following directive. The names function provides a list of likelihood names that can be used to develop models. Once the package has been installed, use the standard library(*) function to load INLA:

> source(”http://www.math.ntnu.no/inla/givemeINLA.R”)

> æ Or, if installed:

library(INLA)

> names(inla.models()$likelihood)

Now create the negative binomial synthetic data used in Chapter 6. We can request that the DIC statistic be displayed using the control.compute option:

Type
Chapter
Information
Bayesian Models for Astrophysical Data
Using R, JAGS, Python, and Stan
, pp. 366 - 368
Publisher: Cambridge University Press
Print publication year: 2017

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

Save book to Kindle

To save this book to your Kindle, first ensure coreplatform@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.

Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.

Find out more about the Kindle Personal Document Service.

Available formats
×

Save book to Dropbox

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Dropbox.

Available formats
×

Save book to Google Drive

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Google Drive.

Available formats
×