HDDM: Hierarchical Bayesian estimation of the Drift-Diffusion Model in Python

The diffusion model is a commonly used tool to infer latent psychological processes underlying decision-making, and to link them to neural mechanisms based on response times. Although efficient open source software has been made available to quantitatively fit the model to data, current estimation methods require an abundance of response time measurements to recover meaningful parameters, and only provide point estimates of each parameter. In contrast, hierarchical Bayesian parameter estimation methods are useful for enhancing statistical power, allowing for simultaneous estimation of individual subject parameters and the group distribution that they are drawn from, while also providing measures of uncertainty in these parameters in the posterior distribution. Here, we present a novel Python-based toolbox called HDDM (hierarchical drift diffusion model), which allows fast and flexible estimation of the the drift-diffusion model and the related linear ballistic accumulator model. HDDM requires fewer data per subject/condition than non-hierarchical methods, allows for full Bayesian data analysis, and can handle outliers in the data. Finally, HDDM supports the estimation of how trial-by-trial measurements (e.g., fMRI) influence decision-making parameters. This paper will first describe the theoretical background of the drift diffusion model and Bayesian inference. We then illustrate usage of the toolbox on a real-world data set from our lab. Finally, parameter recovery studies show that HDDM beats alternative fitting methods like the χ2-quantile method as well as maximum likelihood estimation. The software and documentation can be downloaded at: http://ski.clps.brown.edu/hddm_docs/

[1]  Jeffrey N. Rouder,et al.  Modeling Response Times for Two-Choice Decisions , 1998 .

[2]  K. R. Ridderinkhof,et al.  Striatum and pre-SMA facilitate decision-making under time pressure , 2008, Proceedings of the National Academy of Sciences.

[3]  S. E. Ahmed,et al.  Markov Chain Monte Carlo: Stochastic Simulation for Bayesian Inference , 2008, Technometrics.

[4]  William Feller,et al.  An Introduction to Probability Theory and Its Applications , 1967 .

[5]  David B. Dunson,et al.  Bayesian Data Analysis , 2010 .

[6]  Scott D. Brown,et al.  Neural Correlates of Trial-to-Trial Fluctuations in Response Caution , 2011, The Journal of Neuroscience.

[7]  D. Vickers,et al.  Evidence for an accumulator model of psychophysical discrimination. , 1970, Ergonomics.

[8]  David Huard,et al.  PyMC: Bayesian Stochastic Modelling in Python. , 2010, Journal of statistical software.

[9]  Philip L. Smith,et al.  Psychology and neurobiology of simple decisions , 2004, Trends in Neurosciences.

[10]  Scott D. Brown,et al.  The simplest complete model of choice response time: Linear ballistic accumulation , 2008, Cognitive Psychology.

[11]  Roger Ratcliff,et al.  The Diffusion Decision Model: Theory and Data for Two-Choice Decision Tasks , 2008, Neural Computation.

[12]  E. Wagenmakers,et al.  Bayesian hypothesis testing for psychologists: A tutorial on the Savage–Dickey method , 2010, Cognitive Psychology.

[13]  M. Lee,et al.  Hierarchical diffusion models for two-choice response times. , 2011, Psychological methods.

[14]  Andreas Voss,et al.  Fast-dm: A free program for efficient diffusion model analysis , 2007, Behavior research methods.

[15]  M. Stephens,et al.  Bayesian statistical methods for genetic association studies , 2009, Nature Reviews Genetics.

[16]  E. Wagenmakers,et al.  Hierarchical Bayesian parameter estimation for cumulative prospect theory , 2011, Journal of Mathematical Psychology.

[17]  Bradley P. Carlin,et al.  Bayesian measures of model complexity and fit , 2002 .

[18]  Dale J. Poirier,et al.  The Growth of Bayesian Methods in Statistics and Economics Since 1970 , 2006 .

[19]  M. Plummer Penalized loss functions for Bayesian model comparison. , 2008, Biostatistics.

[20]  Francis Tuerlinckx,et al.  Diffusion model analysis with MATLAB: A DMAT primer , 2008, Behavior research methods.

[21]  D. Navarro,et al.  Fast and accurate calculations for first-passage times in Wiener diffusion models , 2009 .

[22]  William Feller,et al.  An Introduction to Probability Theory and Its Applications , 1951 .

[23]  D. Rubin,et al.  Inference from Iterative Simulation Using Multiple Sequences , 1992 .

[24]  James T. Townsend,et al.  The Stochastic Modeling of Elementary Psychological Processes , 1983 .

[25]  Waldemar Karwowski,et al.  Ergonomics , 2002, Encyclopedia of Information Systems.

[26]  Paul Sajda,et al.  Quality of evidence for perceptual decision making is indexed by trial-to-trial variability of the EEG , 2009, Proceedings of the National Academy of Sciences.

[27]  Brian E. Granger,et al.  IPython: A System for Interactive Scientific Computing , 2007, Computing in Science & Engineering.

[28]  R. Ratcliff,et al.  Estimating parameters of the diffusion model: Approaches to dealing with contaminant reaction times and parameter variability , 2002, Psychonomic bulletin & review.

[29]  Thomas V. Wiecki,et al.  Subthalamic nucleus stimulation reverses mediofrontal influence over decision threshold , 2011, Nature Neuroscience.

[30]  Dani Gamerman,et al.  Markov Chain Monte Carlo: Stochastic Simulation for Bayesian Inference, Second Edition , 2006 .

[31]  John K Kruschke,et al.  Bayesian data analysis. , 2010, Wiley interdisciplinary reviews. Cognitive science.

[32]  W Pieter Medendorp,et al.  Multisensory Processing in Spatial Orientation: An Inverse Probabilistic Approach , 2011, The Journal of Neuroscience.

[33]  Michael D. Lee,et al.  A Survey of Model Evaluation Approaches With a Tutorial on Hierarchical Bayesian Methods , 2008, Cogn. Sci..

[34]  J. Andel Sequential Analysis , 2022, The SAGE Encyclopedia of Research Design.

[35]  Jerry Nedelman,et al.  Book review: “Bayesian Data Analysis,” Second Edition by A. Gelman, J.B. Carlin, H.S. Stern, and D.B. Rubin Chapman & Hall/CRC, 2004 , 2005, Comput. Stat..

[36]  D. LaBerge A recruitment theory of simple behavior , 1962 .

[37]  E. Wagenmakers,et al.  Psychological interpretation of the ex-Gaussian and shifted Wald parameters: A diffusion model analysis , 2009, Psychonomic bulletin & review.

[38]  Stefan Behnel,et al.  Cython: The Best of Both Worlds , 2011, Computing in Science & Engineering.

[39]  Roger Ratcliff,et al.  Reinforcement-Based Decision Making in Corticostriatal Circuits: Mutual Constraints by Neurocomputational and Diffusion Models , 2012, Neural Computation.