Hierarchical Bayesian Modeling of Decision-Making Tasks

Fit an array of decision-making tasks with computational models in a hierarchical Bayesian framework. Can perform hierarchical Bayesian analysis of various computational models with a single line of coding.


Sep 11, 2018 (0.6.0)

  • Add new tasks (Balloon Analogue Risk Task, Choice under Risk and Ambiguity Task, Probabilistic Selection Task, Risky Decision Task (a.k.a. Happiness task), Wisconsin Card Sorting Task)
  • Add a new model for the Iowa Gambling Task (igt_orl)
  • Change priors (Half-Cauchy(0, 5) --> Half-Cauchy(0, 1) or Half-Normal(0, 0.2)
  • printFit function now provides LOOIC weights and/or WAIC weights

March 26, 2018 (0.5.1)

  • Add models for the Two Step task
  • Add models without indecision point parameter (alpha) for the PRL task (prl_*_woa.stan)
  • Model-based regressors for the PRL task are now available
  • For the PRL task & prl_fictitious.stan & prl_fictitious_rp.stan --> change the range of alpha (indecision point) from [0, 1] to [-Inf, Inf]

Dec 25, 2017 (0.5.0)

  • Support variational Bayesian methods (vb=TRUE)
  • Allow posterior predictive checks, except for drift-diffusion models (inc_postpred=TRUE)
  • Add the peer influence task (Chung et al., 2015, USE WITH CAUTION for now and PLEASE GIVE US FEEDBACK!)
  • Add 'prl_fictitious_rp' model
  • Made changes to be compatible with the newest Stan version (e.g., // instead of # for commenting).
  • In 'prl_*' models, 'rewlos' is replaced by 'outcome' so that column names and labels would be consistent across tasks as much as possible.
  • Email feature is disabled as R mail package does not allow users to send anonymous emails anymore.
  • When outputs are saved as a file (*.RData), the file name now contains the name of the data file.

May 20, 2017 (0.4.0)

  • Add a choice reaction time task and evidence accumulation models
    • Drift diffusion model (both hierarchical and single-subject)
    • Linear Ballistic Accumulator (LBA) model (both hierarchical and single-subject)
  • Add PRL models that can fit multiple blocks
  • Add single-subject versions for the delay discounting task (dd_hyperbolic_single and dd_cs_single).
  • Standardize variable names across all models (e.g., rewlos --> outcome for all models)
  • Separate versions for CRAN and GitHub. All models/features are identical but the GitHub version contains precompilled models.

Jan 22, 2017 (0.3.1)

  • Remove dependence on the modeest package. Now use a built-in function to estimate the mode of a posterior distribution.
  • Rewrite the "printFit" function.

Jan 20, 2017 (0.3.0)

  • Made several changes following the guidelines for R packages providing interfaces to Stan.
  • Stan models are precompiled and models will run immediately when called.
  • The default number of chains is set to 4.
  • The default value of adapt_delta is set to 0.95 to reduce the potential for divergences.
  • The “printFit” function uses LOOIC by default. Users can select WAIC or both (LOOIC & WAIC) if needed.

Dec 28, 2016 (

  1. Change
  • Add help files
  • Add a function for checking Rhat values (rhat).
  • Change a link to its tutorial website

Dec 21, 2016 (

  1. Change
  • Use wide normal distributions for unbounded parameters (gng_* models).
  • Automatic removal of rows (trials) containing NAs.

Sep 29, 2016 (

  1. Change
  • Add a function for plotting individual parameters (plotInd)

Sat July 16 2016 (0.2.3)

  1. Change
  • Add a new task: the Ultimatum Game
  • Add new models for the Probabilistic Reversal Learning and Risk Aversion tasks
  • ‘bandit2arm’ -> change its name to ‘bandit2arm_delta’. Now all model names are in the same format (i.e., TASK_MODEL).
  • Users can extract model-based regressors from gng_m* models
  • Include the option of customizing control parameters (adapt_delta, max_treedepth, stepsize)
  • ‘plotHDI’ function -> add ‘fontSize’ argument & change the color of histogram

Sat Apr 02 2016 (0.2.1)

  1. Bug fixes
  • All models: Fix errors when indPars=“mode”
  • ra_prospect model: Add description for column names of a data (*.txt) file
  1. Change
  • Change standard deviations of ‘b’ and ‘pi’ priors in gng_* models

Fri Mar 25 2016 (0.2.0) Initially released.

Reference manual

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


0.7.1 by Woo-Young Ahn, a day ago


Report a bug at https://github.com/CCS-Lab/hBayesDM/issues

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

Authors: Woo-Young Ahn [aut, cre] , Nate Haines [aut] , Lei Zhang [aut] , Harhim Park [ctb] , Jaeyeong Yang [ctb] , Jethro Lee [ctb]

Documentation:   PDF Manual  

GPL-3 license

Imports rstan, loo, grid, parallel, ggplot2, data.table

Depends on Rcpp, methods

Linking to BH, Rcpp, RcppEigen, rstan, StanHeaders

System requirements: GNU make

See at CRAN