SYMP 11-3
Beyond BUGS: Flexible programming of statistical methods for BUGS-compatible models using NIMBLE

Wednesday, August 13, 2014: 9:00 AM
Gardenia, Sheraton Hotel
Perry de Valpine, Environmental Science, Policy, and Management, University of California - Berkeley, Berkeley, CA
Daniel Turek, Environmental Science, Policy, and Management, University of California - Berkeley, Berkeley, CA
Christopher J. Paciorek, Statistics, University of California, Berkeley, Berkeley, CA
Rastislav Bodik, Electrical Engineering and Computer Science, University of California, Berkeley, Berkeley, CA
Duncan Temple Lang, Statistics, University of California, Davis, Davis, CA
Background/Question/Methods

Bayesian analysis in ecology has exploded in popularity, largely facilitated by the availability of the BUGS language for declaring models.  WinBUGS, OpenBUGS and JAGS each implement BUGS and provide automated MCMC algorithms that can lead to long run times for complicated models.  However, MCMC research has led to many improvements that are not readily available in software.  Moreover, the statistics literature abounds with other analysis approaches and algorithms such as particle filtering, Laplace approximation, Gaussian quadrature, importance sampling, data cloning, MC Expectation Maximization, and many more for both Bayesian and frequentist analysis.  Thus, many new and old algorithms remain inaccessible for practical use without re-writing them for each model.  Other software packages provide one or more algorithm with different systems for model specification, but having different packages for different algorithms makes it difficult to combine methods or try different methods on the same problem.

Results/Conclusions

After reviewing this landscape, we introduce the NIMBLE system for programming algorithms for models defined in the BUGS language.  First we introduce the concept of Domain-Specific Languages.  NIMBLE is a Domain-Specific Language embedded in R that allows access to the model structure declared by BUGS code.  BUGS code is processed into model-specific C++ code, compiled, and interfaced with R.  Functions in NIMBLE can use the model structure to allow automatic specialization to the details of any model.   These functions are also processed into C++, compiled, and interfaced with R.  With R's CRAN package system, developers will be able to distribute new algorithms written in NIMBLE.  Examples with MCMC, particle filtering, and more will be presented.