首页 | 本学科首页   官方微博 | 高级检索  
     


Programming With Models: Writing Statistical Algorithms for General Model Structures With NIMBLE
Authors:Perry de Valpine  Daniel Turek  Christopher J. Paciorek  Clifford Anderson-Bergman  Duncan Temple Lang  Rastislav Bodik
Affiliation:1. Department of Environmental Science, Policy and Management, University of California, Berkeley, California;2. Department of Statistics, University of California, Berkeley, California;3. Department of Statistics, University of California, Berkeley, California;4. Department of Statistics, University of California, Davis, California;5. Department of Electrical Engineering and Computer Science, University of California, Berkeley, California
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:Domain-specific language  Hierarchical models  MCEM  MCMC  Probabilistic programming  R
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号