Book contents
- Frontmatter
- Dedication
- Contents
- Preface
- 1 Astrostatistics
- 2 Prerequisites
- 3 Frequentist vs. Bayesian Methods
- 4 Normal Linear Models
- 5 GLMs Part I – Continuous and Binomial Models
- 6 GLMs Part II – Count Models
- 7 GLMs Part III – Zero-Inflated and Hurdle Models
- 8 Hierarchical GLMMs
- 9 Model Selection
- 10 Astronomical Applications
- 11 The Future of Astrostatistics
- Appendix A Bayesian Modeling using INLA
- Appendix B Count Models with Offsets
- Appendix C Predicted Values, Residuals, and Diagnostics
- References
- Index
- Plate section
Appendix A - Bayesian Modeling using INLA
Published online by Cambridge University Press: 11 May 2017
- Frontmatter
- Dedication
- Contents
- Preface
- 1 Astrostatistics
- 2 Prerequisites
- 3 Frequentist vs. Bayesian Methods
- 4 Normal Linear Models
- 5 GLMs Part I – Continuous and Binomial Models
- 6 GLMs Part II – Count Models
- 7 GLMs Part III – Zero-Inflated and Hurdle Models
- 8 Hierarchical GLMMs
- 9 Model Selection
- 10 Astronomical Applications
- 11 The Future of Astrostatistics
- Appendix A Bayesian Modeling using INLA
- Appendix B Count Models with Offsets
- Appendix C Predicted Values, Residuals, and Diagnostics
- References
- Index
- Plate section
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 DataUsing R, JAGS, Python, and Stan, pp. 366 - 368Publisher: Cambridge University PressPrint publication year: 2017