Cognitive Models logo Cognitive Models

This is the tutorial site for the software, ggdmc.

The package, evolving from dynamic model of choice (DMC, Heathcote, Lin, et al., 2018), is a generic tool for conducting Bayesian Computations on cognitive models, with a specific emphasis on the challenging hierarchical choice response-time models.

  1. Instead of using Gibbs or HMC, ggdmc uses population-based MCMC (pMCMC) samplers. A notable Gibbs example for the diffusion model is the Gibbs-based Python software, HDDM (Wiecki, Sofer & Frank, 2013). This Python-based method does not have convenient interface to model the parameter variability. We expand this in our software.

  2. An HMC example aiming for conducting hierarchical Bayesian models is Ahn, Haines, and Zhang’s hBayesDM, which is an R package providing convenient wrapper functions for the well-known Stan software. It is a great package and has included interface to fit models for different cognitive tasks. However, in hBayesDM, the user still needs to modify their own Stan codes for models when s/he uses different designs, not included in the package. DMC expands this function, (Heathcote et al., 2018), so does ggdmc.

  3. ggdmc uses two different variants of migration operator in addition to the crossover operator.

Getting Started

Here is a quick getting start guide:


  1. Download ggdmc from CRAN, GitHub.
  2. [Windows only] Install Rtools to compile C++ codes in ggdmc.
  3. Install the package:


or from GitHub


or from source tarball.

install.packages(‘ggdmc_0.2.6.0.tar.gz’, repos = NULL, type=’source’)

Load ggdmc Package