MCMC, Particle Filtering, and Programmable Hierarchical Modeling

A system for writing hierarchical statistical models largely compatible with 'BUGS' and 'JAGS', writing nimbleFunctions to operate models and do basic R-style math, and compiling both models and nimbleFunctions via custom-generated C++. 'NIMBLE' includes default methods for MCMC, Laplace Approximation, deterministic nested approximations, Monte Carlo Expectation Maximization, and some other tools. The nimbleFunction system makes it easy to do things like implement new MCMC samplers from R, customize the assignment of samplers to different parts of a model from R, and compile the new samplers automatically via C++ alongside the samplers 'NIMBLE' provides. 'NIMBLE' extends the 'BUGS'/'JAGS' language by making it extensible: New distributions and functions can be added, including as calls to external compiled code. Although most people think of MCMC as the main goal of the 'BUGS'/'JAGS' language for writing models, one can use 'NIMBLE' for writing arbitrary other kinds of model-generic algorithms as well. A full User Manual is available at < https://r-nimble.org>.


UNIX

One can specify the path to where the Eigen header files are located and also whether to link common C++ files into every DSO/DLL we create or whether to treat the files as an extra library with:

R CMD INSTALL --configure-args='--with-eigen=/home/duncan/local --enable-lib' nimble

or, within R

install.packages("nimble", configure.args = c("--with-eigen=/home/duncan/local", "--enable-lib=true"), repos = NULL)

Windows

Typically, you need the R developer tools (i.e., compiler, make, etc.) to use nimble. Accordingly, it is quite straightforward to install the package from source as you will have the necessary tools already installed. These are available from the Rtools page on CRAN.

To install the package from source, from within R,

install.packages("nimble", type = "source", INSTALL_opts = "--merge-multiarch")

or from a local copy of the source package,

install.packages("nimble_0.6-2.tar.gz", repos = NULL, INSTALL_opts = "--merge-multiarch")

Alternatively, use the shell command (in the DOS Command prompt)

R CMD INSTALL --merge-multiarch nimble_0.6-9.tar.gz

Of course, you can also compile directly from a clone of the git repository:

R CMD INSTALL --merge-multiarch nimble

The --merge-multiarch is necessary when using a version of R that supports both 32 and 64 bit. This option to installation will ensure that create both 32 and 64 bit installations.

Creating a Windows Binary

R CMD build nimble
R CMD INSTALL --build --merge-multiarch nimble_0.6-9.tar.gz

We need to create the .tar.gz file first, hence the first command.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("nimble")

1.4.3 by Christopher Paciorek, 2 months ago


https://r-nimble.org, https://github.com/nimble-dev/nimble


Report a bug at https://github.com/nimble-dev/nimble/issues


Browse source code at https://github.com/cran/nimble


Authors: Perry de Valpine [aut] , Christopher Paciorek [aut, cre] , Daniel Turek [aut] , Nick Michaud [aut] , Cliff Anderson-Bergman [aut] , Fritz Obermeyer [aut] , Claudia Wehrhahn Cortes [aut] (Bayesian nonparametrics system) , Abel Rodríguez [aut] (Bayesian nonparametrics system) , Duncan Temple Lang [aut] (packaging configuration) , Wei Zhang [aut] (node marginalization) , Sally Paganin [aut] (reversible jump MCMC) , Joshua Hug [aut] (WAIC) , Paul van Dam-Bates [aut] (Pólya-Gamma sampler , nimIntegrate , matrix exponential) , Jagadish Babu [ctb] (code for the compilation system for an early version of NIMBLE) , Lauren Ponisio [ctb] (contributions to the cross-validation code) , Peter Sujan [ctb] (multivariate t distribution code)


Documentation:   PDF Manual  


BSD_3_clause + file LICENSE | GPL (>= 2) license


Imports methods, igraph, coda, R6, pracma, numDeriv

Suggests testthat, mcmcse, nloptr, nimbleQuad

System requirements: GNU make


Imported by CausalMixGPD, InvStablePrior, exdqlm, ivd, nimbleExtra, nimblewomble, scPloidy, spatialAtomizeR.

Depended on by BayesNSGP, BayesSIM, DPCD, MultiNMix, ValidationExplorer, Xcertainty, ameras, baorista, baytaAAR, compareMCMCs, nimbleAPT, nimbleCarbon, nimbleEcology, nimbleHMC, nimbleMacros, nimbleNoBounds, nimbleQuad, nimbleSCR, nimbleSMC.

Suggested by bridgesampling, camtrapR, ct, occumb, postpack, priorsense, prova, rjuliabugs, runMCMCbtadjust, saeHB.


See at CRAN