Drift Diffusion Model

271 views
Skip to first unread message

Jonathon Howlett

unread,
Jun 21, 2017, 12:49:02 PM6/21/17
to hbayesdm-users
Hi,

I am very interested in applying the drift diffusion model.  According to my understanding, the input for the model for each trial includes subject identifier, response, and reaction time, but does not include any information about the stimulus/trial type.  In my task, there are two stimuli and two responses; subjects are instructed to respond based on the stimulus.  An "A" response to an "A" stimulus would be correct, while a "B" response to an "A" stimulus would be an error.  The accuracy rates on this task are quite high, with many subjects achieving 100% accuracy.

I have been unable to apply the hBayesDM drift diffusion model to my data.  If I encode an "A" response as the upper boundary and a "B" response as the lower boundary, the model will not generate results (presumably because, without information about the stimulus type, the resulting drift rate would be approximately zero and all responses would be based on noise).  If I encode a correct response as the upper boundary and an error as the lower boundary, the model will not run, presumably because many subjects have 100% accuracy (i.e. no error trials).

Is it possible to apply the drift diffusion model to my task?

Thank you,
Jon

Woo-Young Ahn

unread,
Jun 21, 2017, 2:51:32 PM6/21/17
to hbayesdm-users
Hi Jon,

And have you checked the 'choiceRT_lba' model? Currently 'choiceRT_ddm' doesn't have the flexibility of modeling more than 1 condition YET. 

Could you upload a sample dataset (maybe 2-3 subjects' data) so that we can test it?

Best,
Young

Jonathon Howlett

unread,
Jun 21, 2017, 5:48:43 PM6/21/17
to hbayesdm-users
Hi Young,

Thank you for your response.  I have tried the LBA model (but so far with only a small number of iterations, not enough to determine whether it converges).  I get 4 drift rates (A response for an A stimulus, B response for an A stimulus, B response for a B stimulus, and A response for a B stimulus).  Note that error trials (A response for B stimulus and B response for A stimulus) are rare and are nonexistent for some subjects, so I am not sure whether these rates are meaningful.

I have attached a sample dataset with 3 subjects.  The "condition" column refers to stimulus type, so the "condition" and "response" columns match on most of the trials.

Thank you,
Jon
SampleFile.txt

Woo-Young Ahn

unread,
Jun 21, 2017, 6:42:17 PM6/21/17
to hbayesdm-users
It seems chocieRT_lba model can fit at least the 3 subjects' data well? For example, you can check individual parameters by calling:

output = choiceRT_lba("~/Downloads/SampleFile.txt", 2000, 1000, 4, 4)

plotInd(output, "v")
output$allIndPars


And please check this paper. We used their Stan code almost as it is in hBayesDM version 0.4.0. 

Annis, J., Miller, B. J., & Palmeri, T. J. (2016). Bayesian inference with Stan: A tutorial on adding custom distributions. Behavior research methods, 1-24.



The DDM included in the hBayesDM (v0.4.0) doesn't have a lot of features yet. So for more drift diffusion modeling, you can also check HDDM (http://ski.clps.brown.edu/hddm_docs/) and other DDM packages.

Best,
Young
Reply all
Reply to author
Forward
0 new messages