nimble-dev / compareMCMCs

Tools for comparing MCMC efficiency from nimble and/or other engines
GNU General Public License v3.0
1 stars 2 forks source link

compareMCMCs

CRAN DOI

compareMCMCs is a package for running, managing, and comparing results from different MCMC packages. It was refactored from the nimble package as part of the release of nimble version 0.8.0.

The User Manual (aka package vignette) giving an overview of compareMCMCs can be viewed here.

Right now, compareMCMCs works with NIMBLE, JAGS and Stan. It has a plug-in system to make it easy to include other MCMC engines in comparisons.

compareMCMCs allows you to configure a set of MCMCs to run and then automatically time them and process their results to generate html output with comparisons of efficiency and posterior distributions. This system started life as part of the nimble package. It can make use of nimble's MCMC configuration system, or it can be used independently of nimble.

Use of other MCMCs is supported by a plugin system. Plugins are provided for JAGS and Stan. Since nimble and JAGS (as well as WinBUGS and OpenBUGS) use different dialects of the same model language, it is sometimes possible to compare them using the same model code.

It is also possible to provide new comparison metrics and/or new figure components for html comparison pages.

In summary, compareMCMCs provides:

Installation

compareMCMCs is on CRAN and can be installed from R via

install.packages("compareMCMCs")

To install compareMCMCs from Github

library(devtools)
install_github("nimble-dev/compareMCMCs", subdir = "compareMCMCs")

Or, of course, you can download and build the package, which is in the directory compareMCMCs.

Dependencies to run MCMC plug-ins

To use the compareMCMCs plugin for JAGS you first need to install JAGS. See [JAGS homepage for platform-based instructions. You will also need the rjags package:

install.packages("rjags")

To use the compareMCMCs plugin for stan, you first need to install the rstan package:

install.packages("rstan")

Contributing and requesting support

We welcome contributions to compareMCMCs. Of particular interest are contributions for the various plug-in features, including:

We also welcome support requests, bug fixes and documentation suggestions.

To request support or report a bug, please be signed in to a GitHub account and submit an issue here.

To contribute code, please make a GitHub pull request. If it is very short or you want to start discussion about the idea before implementing it, you can do so by submitting an issue.