[R-pkgs] NIMBLE package for hierarchical modeling now on CRAN

Chris Paciorek paciorek at stat.berkeley.edu
Mon Dec 5 01:30:31 CET 2016

NIMBLE version 0.6-2 has been released on CRAN and at  r-nimble.org.

NIMBLE is a system that allows you to:

 - Write general hierarchical statistical models in BUGS code and
create a corresponding model object to use in R.
 - Build Markov chain Monte Carlo (MCMC), particle filters, Monte
Carlo Expectation  Maximization (MCEM), or write generic algorithms
that can be applied to any model.
 - Compile models and algorithms via problem-specific generated C++
that NIMBLE interfaces to R for you.

Most people associate BUGS with MCMC, but NIMBLE is about much more
than that.  It implements and extends the BUGS language as a flexible
system for model declaration and lets you do what you want with the
resulting models.  Some of the cool things you can do with NIMBLE

 - Extend BUGS with functions and distributions you write in R as
nimbleFunctions, which will be automatically turned into C++ and
compiled into your model.
 - Program with models written in BUGS code: get and set values of
variables, control model calculations, simulate new values, use
different data sets in the same model, and more.
 - Write your own MCMC samplers as nimbleFunctions and use them in
combination with NIMBLE’s samplers.
 - Write functions that use MCMC as one step of a larger algorithm.
 - Use standard particle filter methods or write your own.
 - Combine particle filters with MCMC as Particle MCMC methods.
 - Write other kinds of model-generic algorithms as nimbleFunctions.
 - Compile a subset of R’s math syntax to C++ automatically, without
writing any C++ yourself.

Compared to earlier versions, the new version of NIMBLE is faster and
more flexible in a lot of ways.  Building and compiling models and
algorithms could sometimes get bogged down for large models, so we
streamlined those steps quite a lot.   We’ve generally increased the
efficiency of C++ generated by the NIMBLE compiler.  We’ve added
functionality to what can be compiled to C++ from nimbleFunctions.
And we’ve added a bunch of better error-trapping and informative
messages, although there is still a good way to go on that.   Give us
a holler on the nimble-users list (see r-nimble.org) if you run into

- Chris Paciorek, for the NIMBLE development team

More information about the R-packages mailing list