HDDM: Hierarchical Bayesian estimation of the Drift Diffusion Model

1,769 views

Published on

Talk presented at MathPsych

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

Published in: Business, Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,769
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
8
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

HDDM: Hierarchical Bayesian estimation of the Drift Diffusion Model

  1. 1. HDDM: Hierarchical Bayesian Drift-Diffusion Modeling Thomas V. Wiecki & Imri Sofer, Michael J. Frank
  2. 2. Drift-Diffusion Model
  3. 5. Traditional model fitting Fitting separate models to each subject Fitting one model to all subjects e.g. DMAT, fast-dm, EZ Ignores similarities Ignores differences Subject 1 ... Subject n P( data 1 | θ 1 ) ... P( data n | θ n ) P( data| θ ) Subject 1 ... Subject n Subject 1 ... Subject n Subject 1 ... Subject n
  4. 6. Hierarchical model estimation Subject 1 ... Subject n Group P( θ group |θ 1 , θ. , , θ n ) P(θ 1 |data, θ group ) ... P(θ n |data, θ group )
  5. 7. Hierarchical Bayesian estimation <ul>Pro <li>Adequately maps experimental structure onto model
  6. 8. Needs less data for individual subject estimation
  7. 9. Constraining of subject parameters (helps with extreme fits)
  8. 10. Estimation of full posterior, not just maximum
  9. 11. ... </li></ul><ul>Contra <li>Computationally expensive (sampling, e.g. MCMC)
  10. 12. Correct model behavior can be hard to assess (e.g. chain convergence)
  11. 13. Methods still in development </li></ul>
  12. 14. <ul><li>Hierarchical Bayesian estimation (via PyMC) of parameters of the DDM in Python. </li><ul><li>Ratcliff, Vandekerckhove, Tuerlinckx, Lee, Wagenmakers </li></ul><li>Heavily optimized likelihood functions </li><ul><li>Navarro & Fuss (2009) likelihood
  13. 15. Collapsed model for inter-trial variabilities </li></ul><li>Flexible creation of complex models tailored to specific hypotheses (e.g. separate drift-rate parameters for different stimulus types).
  14. 16. Several convergence and goodness-of-fit diagnostics
  15. 17. Validated : integrated tests check if parameters from simulated data can be recovered </li></ul>HDDM
  16. 18. ...it works!
  17. 19. How to get your data into HDDM response, rt, subj_idx, difficulty 1, 1.06, 1, hard 1, 1.052, 1, hard 1, 1.398, 1, hard 0, 0.48, 1, easy 1, 1.798, 1, easy 1, 0.94, 1, easy 1, 2.093, 2, hard 1, 0.91, 2, hard 0, 1.019, 2, hard ...
  18. 20. Model specification via configuration file [depends] v = difficulty [mcmc] samples=5000 burn=1000
  19. 21. Model fitting $> hddmfit simple_difficulty.conf simple_difficulty.csv Creating model... Sampling: 100% [0000000000000000000000000000000000] Iterations: 5000 name mean std 2.5q 25q 50q 75q 97.5 mc_err a : 2.029 0.034 1.953 2.009 2.028 2.049 2.090 0.002 t : 0.297 0.007 0.282 0.292 0.297 0.302 0.311 0.001 v('easy',): 0.992 0.051 0.902 0.953 0.987 1.028 1.102 0.003 v('hard',): 0.522 0.049 0.429 0.485 0.514 0.561 0.612 0.002 logp: -1171.276303 DIC: 2329.069932 DIC without separate drift rates: 2373.395603
  20. 22. Output statistics hard condition easy condition Error responses mirrored along y-axis.
  21. 23. Output statistics II
  22. 24. Python model creation import hddm # Load data from csv file into a NumPy structured array data = hddm.load_csv('simple_subj_data.csv') # Create a HDDM model multi object model = hddm.HDDM(data, depends_on={'v':'difficulty'}) # Create model and start MCMC sampling model.sample(5000, burn=2000) # Print fitted parameters and other model statistics model.print_stats() # Plot posterior distributions and theoretical RT distributions hddm.plot_posteriors(model) hddm.plot_post_pred(model)
  23. 25. Trial-by-trial random effects Cavanagh, Wiecki et al (submitted)
  24. 26. Upcoming features <ul><li>GPU optimized likelihood (~5x speed-up)
  25. 27. Contaminant model
  26. 28. Linear Ballistic Accumulator Model
  27. 29. Switch-task model </li></ul>Note to developers: it is very easy to add your own models to this framework!
  28. 30. http://github.com/hddm-devs/hddm

×