Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Author:

Thomas V. Wiecki, Imri Sofer, Michael J. Frank

Contact:
thomas_wiecki@brown.edu, imri_sofer@brown.edu, michael_frank@brown.edu
Web site:

http://ski.clps.brown.edu/hddm_docs

Github:

http://github.com/hddm-devs/hddm

Mailing list:

https://groups.google.com/group/hddm-users/

License:

HDDM is released under the BSD 2 license.

Version:
0.5beta2
https://secure.travis-ci.org/hddm-devs/hddm.png?branch=develop

Purpose

HDDM is a python toolbox for hierarchical Bayesian parameter estimation of the Drift Diffusion Model (via PyMC). Drift Diffusion Models are used widely in psychology and cognitive neuroscience to study decision making.

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 (Navarro & Fuss, 2009).

  • Flexible creation of complex models tailored to specific hypotheses (e.g. estimation of separate drift-rates 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.

Quick-start

The following is a minimal python script to load data, run a model and examine its parameters and fit.

import hddm

# Load data from csv file into a NumPy structured array
data = hddm.load_csv('simple_difficulty.csv')

# Create a HDDM model multi object
model = hddm.HDDM(data, depends_on={'v':'difficulty'})

# Create model and start MCMC sampling
model.sample(10000, burn=5000)

# Print fitted parameters and other model statistics
model.print_stats()

# Plot posterior distributions and theoretical RT distributions
model.plot_posteriors(save=True)
model.plot_posterior_predictive(save=True)

Installation

Windows

The easiest way is to download and install Anaconda or the Enthought Python Distribution (EPD) which is free for academic use.

We recommend using pip to download and install HDDM. The easiest way to install pip is via easy_install. Start the windows command shell (cmd.exe) and type

easy_install pip

Then install kabuki and HDDM:

pip install kabuki
pip install hddm

Linux (Debian based, such as Ubuntu)

Most of HDDM’s dependencies are available from your repository, you can install them by typing

apt-get install python python-dev python-numpy python-scipy python-matplotlib cython python-pip gfortran liblapack-dev

which requires sudo rights.

Optional dependencies for hddm_demo.py can be installed via

apt-get install python-wxgtk2.8 python-traitsui

Then install kabuki and HDDM:

sudo pip install pandas
sudo pip install pymc
sudo pip install kabuki
sudo pip install hddm

OSX

We recommend installing the SciPy Superpack maintained by Chris Fonnesbeck.

The Superpack requires you to install XCode which apparently does not bundle with gcc anymore (which is required by HDDM). This repository provides some appropriate installers:

https://github.com/kennethreitz/osx-gcc-installer/downloads

Then install kabuki and HDDM:

sudo pip install kabuki
sudo pip install hddm

How to cite

If HDDM was used in your research, please cite the following:

Wiecki, T. V., Sofer, I. and Frank, M. J. Hierarchical Bayesian estimation of the drift diffusion model: quantitative comparison with maximum likelihood. Program No. 494.13/CCC30. 2012 Neuroscience Meeting Planner. New Orleans, LA: Society for Neuroscience, 2012.

Getting started

Check out the tutorial on how to get started. Further information can be found in howto and the documentation.

Join our low-traffic mailing list.

Metadata

Release files for HDDM 0.5beta2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for HDDM 0.5beta2
File Size Uploaded
HDDM-0.5beta2.tar.gz 554.9 kB Details

Release files / HDDM-0.5beta2.tar.gz

Download URL HDDM-0.5beta2.tar.gz
Size 554.9 kB
Tags Source
SHA-256 checksum
How to use checksums
7d0397ee090becbabf4d4873f2b75b9428463178bc624118b2da255386e524f7
BLAKE2b-256 checksum
How to use checksums
2501eef347a9c9277264183ef25f5f4ac91c2c13e65045adaec9e5a73f062281
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

1.0.1

1 release file

1.0.0

1 release file

0.9.9

1 release file

0.9.8

1 release file

0.8.0

1 release file

0.7.9

1 release file

0.7.8

1 release file

0.7.7

1 release file

0.7.6

1 release file

0.7.5

1 release file

0.7.4

1 release file

0.7.3

1 release file

0.7.2

1 release file

0.7.1

1 release file

0.7.0

1 release file

0.6.1

1 release file

0.5.5

1 release file

0.5.4

1 release file

0.5.3

1 release file

0.5.2

3 release files

0.5

1 release file

This release

0.5beta2 This release

1 release file

0.4.1

1 release file

0.4

1 release file

0.3.1

1 release file

0.3

1 release file

0.2

1 release file

0.1.1

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page