AD-beta

A beta-testing version of NIMBLE provides automatic differentiation, which in turn enables methods such as Hamiltonian Monte Carlo (HMC) and Laplace approximation. HMC is provided separately in the nimbleHMC package.

For users interested in ecological models (including Hidden Markov Models and capture-recapture models, which are really more general than ecology), the marginal distributions in the nimbleEcology package have been updated to support AD, also in a beta release.

You will need the remotes R package installed to use the following instructions.

To install NIMBLE’s testing version (release candidate) with AD support, do:
remotes::install_github("nimble-dev/nimble", ref="AD-rc1", subdir="packages/nimble", quiet=TRUE)

This might take several minutes.

To install the testing version of nimbleHMC (which will only work after the previous step), do:
remotes::install_github("nimble-dev/nimbleHMC", subdir = "nimbleHMC")

Windows users might need to include an additional argument to install nimbleHMC:
remotes::install_github("nimble-dev/nimbleHMC", subdir = "nimbleHMC", INSTALL_opts = "--no-multiarch")

To install the testing version of nimbleEcology with AD support, do:
remotes::install_github("nimble-dev/nimbleEcology", ref = "AD-rc0")

A draft chapter of the NIMBLE User Manual describing how to use AD, including examples with HMC and Laplace approximation, is here.