|Date:||July 19, 2011|
|Author:||Thomas V. Wiecki, Imri Sofer, Michael J. Frank|
|Contact:||email@example.com, firstname.lastname@example.org, email@example.com|
|Copyright:||This document has been placed in the public domain.|
|License:||HDDM is released under the GPLv3.|
HDDM is a python module that implements Hierarchical Bayesian estimation of Drift Diffusion Models (via PyMC).
HDDM provides functionalities to make Drift Diffusion analysis of error rates and reaction time distributions as painless as possible. Here is a short list of some of its features:
- Uses hierarchical bayesian estimation (via PyMC) of DDM parameters to allow simultaneous estimation of subject and group parameters, where individual subjects are assumed to be drawn from a group distribution. HDDM should thus produce better estimates when less RT values are measured compared to other methods using maximum likelihood for individual subjects (i.e. DMAT or fast-dm).
- Heavily optimized likelihood functions for speed.
- Flexible creation of complex models tailored to specific hypotheses (e.g. separate drift-rate or other parameters for different task conditions, or predicted changes in model parameters as a function of other indicators like brain activity).
- Easy specification of models via configuration file fosters exchange of models and research results.
- Built-in Bayesian hypothesis testing and several convergence and goodness-of-fit diagnostics.
The easiest way to use HDDM is by creating a configuration file for your model:
[depends] v = difficulty [mcmc] samples=10000 # Sample 5000 posterior samples burn=5000 # Discard the first 100 samples as burn-in thin=3 # Discard every third sample to remove autocorrelations
Then call hddm:
hddm_fit.py example.conf mydata.csv
HDDM has the following dependencies:
- PyMC (installation instructions: http://pymc.googlecode.com/svn/doc/installation.html)
The easiest way is to download and install the Enthought Python Distribution which is free for academic use.
After this open cmd.exe and type
Linux (Debian based, such as Ubuntu)
The following commands require admin rights
aptitude install python python-numpy python-scipy python-matplotlib cython python-pip gfortran lapack-dev
You can either install the package automatically from pypi:
pip install hddm
Or, you can install the package from the source directory:
python setup.py install
Check out the documentation for a manual and tutorial for how to use HDDM.