Programming With Models: Writing Statistical Algorithms for General Model Structures With NIMBLE
Top Cited Papers
- 3 April 2017
- journal article
- Published by Taylor & Francis Ltd in Journal of Computational and Graphical Statistics
- Vol. 26 (2), 403-413
- https://doi.org/10.1080/10618600.2016.1172487
Abstract
We describe NIMBLE, a system for programming statistical algorithms for general model structures within R. NIMBLE is designed to meet three challenges: flexible model specification, a language for programming algorithms that can use different models, and a balance between high-level programmability and execution efficiency. For model specification, NIMBLE extends the BUGS language and creates model objects, which can manipulate variables, calculate log probability values, generate simulations, and query the relationships among variables. For algorithm programming, NIMBLE provides functions that operate with model objects using two stages of evaluation. The first stage allows specialization of a function to a particular model and/or nodes, such as creating a Metropolis-Hastings sampler for a particular block of nodes. The second stage allows repeated execution of computations using the results of the first stage. To achieve efficient second-stage computation, NIMBLE compiles models and functions via C++, using the Eigen library for linear algebra, and provides the user with an interface to compiled objects. The NIMBLE language represents a compilable domain-specific language (DSL) embedded within R. This article provides an overview of the design and rationale for NIMBLE along with illustrative examples including importance sampling, Markov chain Monte Carlo (MCMC) and Monte Carlo expectation maximization (MCEM). Supplementary materials for this article are available online.Keywords
Other Versions
This publication has 31 references indexed in Scilit:
- Understanding predictive information criteria for Bayesian modelsStatistics and Computing, 2013
- AD Model Builder: using automatic differentiation for statistical inference of highly parameterized complex nonlinear modelsOptimization Methods and Software, 2012
- Frequentist analysis of hierarchical models for population dynamics and demographic dataJournal of Ornithology, 2011
- Estimability and Likelihood Inference for Generalized Linear Mixed Models Using Data CloningJournal of the American Statistical Association, 2010
- The BUGS project: Evolution, critique and future directionsStatistics in Medicine, 2009
- Approximate Bayesian Inference for Latent Gaussian models by using Integrated Nested Laplace ApproximationsJournal of the Royal Statistical Society Series B: Statistical Methodology, 2009
- Data cloning: easy maximum likelihood estimation for complex ecological models using Bayesian Markov chain Monte Carlo methodsEcology Letters, 2007
- Inference for nonlinear dynamical systemsProceedings of the National Academy of Sciences of the United States of America, 2006
- R: A Language for Data Analysis and GraphicsJournal of Computational and Graphical Statistics, 1996
- A Monte Carlo Implementation of the EM Algorithm and the Poor Man's Data Augmentation AlgorithmsJournal of the American Statistical Association, 1990