Skip to content

Releases: nimble-dev/nimble

v1.2.1

01 Aug 01:22
Compare
Choose a tag to compare

NIMBLE is a system for building and sharing analysis methods for statistical models, especially for hierarchical models and computationally-intensive methods (such as MCMC, Laplace approximation, and SMC).

This is a micro release that primarily addresses some packaging changes requested by CRAN. In addition, this release includes:

  • A multinomial MCMC sampler, sampler_RW_multinomial, for random variables following a multinomial distribution.
  • Some enhancements to error trapping and warning messages.
  • A variety of minor bug fixes.

v1.2.0

10 Jun 00:24
Compare
Choose a tag to compare

NIMBLE is a system for building and sharing analysis methods for statistical models, especially for hierarchical models and computationally-intensive methods (such as MCMC, Laplace approximation, and SMC).

Version 1.2.0 provides extensive new functionality, including:

  • A Pólya-gamma sampler, sampler_polyagamma, for conjugate sampling of linear predictor parameters in logistic regression model specifications, including handling zero inflation and stochastic design matrices.
  • A new sampler, sampler_noncentered, which samples the mean or standard deviation of a set of random effect values in a transformed space such that the random effects are deterministically shifted or scaled given new values of their hyperparameters. For random effects written in a centered parameterization, sampling is performed as if they had been written in a noncentered parameterization, thereby enabling a variant on the Yu and Meng (2011) interweaving sampling strategy of sampling in both parameterizations.
  • A completely revamped MCEM algorithm, fixing a bug so that any parts of the model not connected to the latent states are included in MLE calculations, giving greater control and adding minor extensions to the ascent-based MCEM approach, using automatic derivatives in the maximization when possible, and converting buildMCEM to be a nimbleFunction rather than an R function.
  • Adaptive Gauss-Hermite quadrature (AGHQ) for integrating over latent effects, as an extension of NIMBLE's Laplace approximation functionality. Also adds user-friendly R functions, runLaplace and runAGHQ, for using Laplace and AGHQ approximation for maximum likelihood estimation.
  • A more flexible optimization system via nimOptim, with support for nlminb built in as well as the capability for users to provide potentially arbitrary optimization functions in R.
  • Allowing the use of nimbleFunctions with setup code in models either for user-defined functions via <- or for user-defined distributions via ~. This supports holding large objects outside of model nodes for use in models.

In addition to the new functionality above, other enhancements and bug fixes include:

  • Erroring out if the RW_block sampler is assigned to any discrete nodes.
  • Improving the speed of MCMC building in certain cases with many simple samplers by using inherits rather than is.
  • Adding an argument to buildMCMC controlling whether to initialize values in the model.
  • Improving the efficiency of setting up derivative information for models with multivariate nodes with many elements.
  • Providing ability to control number of digits printed in C++ output.
  • Allowing use of categorical MCMC sampler with user-specified dcat-like distributions.
  • Warning of use of backward indexing in nimble models.
  • Improve documentation of LKJ distribution and derivative tracking in the AD system.
  • Fixing some internals related to memory handling in compiled code to avoid intermittent errors and crashes occurring in testing.
  • Fixing a harmless typo causing partial name matching in R.
  • Fixing an insufficient check for conjugacy in stickbreaking specifications.
  • Removing spurious warning when returnType is character() in a nimbleFunction.
  • Fixing incorrect error message when getParam used with non-existent node.
  • Fixing compilation failures occurring on Red Hat Linux.
  • Reenabling functionality for user-provided Eigen library and related updates to autoconf configuration.
  • Enhancing functionality to support model macros.
  • Removing deprecated is.na.vec and is.nan.vec.
  • Removing deprecated dummy functions for compareMCMCs functions.

v1.1.0

01 Feb 01:47
Compare
Choose a tag to compare

NIMBLE is a system for building and sharing analysis methods for statistical models, especially for hierarchical models and computationally-intensive methods (such as MCMC, Laplace approximation, and SMC).

Version 1.1.0 provides new functionality and a variety of bug fixes.

  • Enhancing our automatic differentiation (AD) system to enhance use of AD (and therefore HMC sampling) in models, including use of stochastic indexing and CAR models, as well as allowing distributions and functions (whether user-defined or built-in) that lack AD support (such as dinterval, dconstraint, and truncated distributions) to be used and compiled in AD-enabled models.
  • Adding nimIntegrate to the NIMBLE language, providing one-dimensional numerical integration via adaptive quadrature, equivalent to R's integrate.
  • Adding a "prior samples" MCMC sampler, which uses an existing set of numerical samples to define the prior distribution of model node(s).
  • Better handling of CRP models under non-standard settings.
  • Cleanly error trapping use of C++ keywords as model variable names.
  • Removing the RW_multinomial MCMC sampler, which was found to generate incorrect posterior results.
  • Fixing a bug in conjugacy checking in a case of subsets of multivariate nodes.
  • Fixing is.na and is.nan to operate in the expected vectorized fashion.
  • Improving documentation of AD, nimbleHMC, and nimbleSMC in the manual.
  • Updating to Eigen version 3.4.0.

v1.0.1

16 Jun 14:25
Compare
Choose a tag to compare

NIMBLE is a system for building and sharing analysis methods for statistical models, especially for hierarchical models and computationally-intensive methods (such as MCMC and SMC).

Version 1.0.1 follows shortly after 1.0.0 and fixes a bug introduced in version 1.0.0 causing data to be set incorrectly in certain models and likely causing incorrect results from algorithms such as MCMC. The affected models are ones with autoregressive structure directly on data nodes and with a variable containing both data and elements appearing only on the right-hand side of model declarations (such as is often the case for capture-recapture models).

v1.0.0

26 May 20:07
Compare
Choose a tag to compare

NIMBLE is a system for building and sharing analysis methods for statistical models, especially for hierarchical models and computationally-intensive methods (such as MCMC and SMC).

Version 1.0.0 provides substantial new functionality. This includes:

  • A Laplace approximation algorithm that allows one to find the MLE for model parameters based on approximating the marginal likelihood in models with continuous random effects/latent process values.
  • A Hamiltonian Monte Carlo (HMC) MCMC sampler implementing the NUTS algorithm (available in the nimbleHMC package).
  • Support in NIMBLE’s algorithm programming system to obtain derivatives of functions and arbitrary calculations within models.
  • A parameter transformation system allowing algorithms to work in unconstrained parameter spaces when model parameters have constrained domains.

These are documented via the R help system and a new section at the end of our User Manual. We’re excited for users to try out the new features and let us know of their experiences. In particular, given these major additions to the NIMBLE system, we anticipate the possibility of minor glitches. The best place to reach out for support is still the nimble-users list.

In addition to the new functionality above, other enhancements and bug fixes include:

  • Fixing a bug (previously reported in a nimble-users message) giving incorrect results in NIMBLE’s cross-validation function (runCrossValidate) for all but the ‘predictive’ loss function for NIMBLE versions 0.10.0 – 0.13.2.
  • Fixing a bug in conjugacy checking causing incorrect identification of conjugate relationships in models with unusual uses of subsets, supersets, and slices of multivariate normal nodes.
  • Improving control of the addSampler method for MCMC.
  • Improving the WAIC system in a few small ways.
  • Enhancing error trapping and warning messages.

v0.13.2

16 May 00:07
Compare
Choose a tag to compare

NIMBLE is a system for building and sharing analysis methods for statistical models, especially for hierarchical models and computationally-intensive methods (such as MCMC and SMC).

Version 0.13.2 exists solely to address some developer-level issues as required by CRAN and is identical to 0.13.1 from the user perspective.

v0.13.1

19 Dec 19:04
Compare
Choose a tag to compare

NIMBLE is a system for building and sharing analysis methods for statistical models, especially for hierarchical models and computationally-intensive methods (such as MCMC and SMC).

Version 0.13.1 follows shortly after 0.13.0 and fixes a bug introduced in our new handling of predictive nodes in MCMC in version 0.13.0. The bug could affect MCMC results when using version 0.13.0 in models that both (1) have predictive nodes and (2) have multivariate nodes.

v0.13.0

17 Nov 01:55
Compare
Choose a tag to compare

NIMBLE is a system for building and sharing analysis methods for statistical models, especially for hierarchical models and computationally-intensive methods (such as MCMC and SMC).

Version 0.13.0 provides a variety of new functionality and bug fixes, including:

  • Thoroughly revamping handling of posterior predictive nodes in the MCMC system, in particular that MCMC samplers, by default, will now exclude predictive dependencies from internal sampler calculations. This should improve MCMC mixing for models with predictive nodes. Posterior predictive nodes are now sampled conditional on all other model nodes at the end of each MCMC iteration.
  • Adding functionality to the MCMC configuration system, including a new replaceSamplers method and arguments default and nodes for the addSamplers method.
  • Adding an option to the WAIC system to allow additional burnin (in
    addition to standard MCMC burnin) before calculating online WAIC, thereby
    allowing inspection of initial samples without forcing them to be used for WAIC
  • Warning users of unused constants during model building.
  • Fixing bugs that prevented use of variables starting with 'logProb' or named 'i' in model code.
  • Fixing a bug to prevent infinite recursion in particular cases in conjugacy checking.
  • Fixing a bug in simulating from dcar_normal nodes when multiple nodes passed to simulate.

v0.12.2

01 Mar 02:37
Compare
Choose a tag to compare

NIMBLE is a system for building and sharing analysis methods for statistical models, especially for hierarchical models and computationally-intensive methods (such as MCMC and SMC).

Version 0.12.2 is a bug fix release. In particular, this release fixes a bug in our Bayesian nonparametric distribution (BNP) functionality that gives incorrect MCMC results when using the dCRP distribution when the parameters of the mixture components (i.e., the clusters) have hyperparameters (i.e., the base measure parameters) that are unknown and sampled during the MCMC. Here is an example basic model structure that is affected by the bug:

k[1:n] ~ dCRP(alpha, n)
for(i in 1:n) {
  y[i] ~ dnorm(mu[k[i]], 1)
  mu[i] ~ dnorm(mu0, 1)      ## mixture component parameters with hyperparameter
}
mu0 ~ dnorm(0, 1)     ## unknown cluster hyperparameter

(There is no problem without the hyperparameter layer – i.e., if mu0 is a fixed value – which is the situation in many models.) We strongly encourage users using models with this structure to rerun their analyses.

Other changes in this release include:

  • Fixing an issue with reversible jump variable selection under a similar situation to the BNP issue discussed above (in particular where there are unknown hyperparameters of the regression coefficients being considered, which would likely be an unusual use case).
  • Fixing a bug preventing setup of conjugate samplers for dwishart or dinvwishart nodes when using dynamic indexing.
  • Fixing a bug preventing use of truncation bounds specified via data or constants.
  • Fixing a bug preventing MCMC sampling with the LKJ prior for 2×2 matrices.
  • Fixing a bug in runCrossValidate affecting extraction of multivariate nodes.
  • Fixing a bug producing incorrect subset assignment into logical vectors in nimbleFunction code.
  • Fixing a bug preventing use of nimbleExternalCall with a constant expression.
  • Fixing a bug preventing use of recursion in nimbleFunctions without setup code.
  • Fixing handling nimSeq default by value.
  • Fixing access to member data more than two dimensions in a nested nimbleFunction.

v0.12.1

11 Oct 19:39
Compare
Choose a tag to compare

NIMBLE is a system for building and sharing analysis methods for statistical models, especially for hierarchical models and computationally-intensive methods (such as MCMC and SMC).

Version 0.12.1 follows shortly after 0.12.0 and fixes a bug introduced in conjugacy processing in version 0.11.0 that causes incorrect MCMC sampling only in specific cases. The impacted cases have terms of the form "a[i] + x[i] * beta" (or more simply "x[i] * beta" or "a[i] + beta"), with beta subject to conjugate sampling and either (i) 'x' provided via NIMBLE's constants argument and x[1] == 1 or (ii) 'a' provided via NIMBLE's constants argument and a[1] == 0.