File Exchange

image thumbnail

Drift Diffusion Process

version 1.0 (2.39 KB) by

Simulating the drift diffusion process (variability across trial)

4.66667
3 Ratings

5 Downloads

Updated

View License

This is a optimized simulation of the drift diffusion process (DDP, as described, for example, here http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2474742/). I used a mixture of for loops and cumsum to obtain high speed.
The same code can be used to have a diffusion process without drift across trial, a binary DDP, a one-choice DDP, a one choice pure diffusion process.

Comments and Ratings (4)

Arthur Knol

Hause Lin

Valerio Biscione

Hi Jing, fitting the drift diffusion model could be quite tricky. You could use the DMAT toolbox designed exactly for that purpose. Alternatively I have some methods that I use myself. I will maybe post them on here in the future, if I can manage to clean the code up a little bit.

Jing

Jing (view profile)

I'm so happy to find this code! Would you please tell how to fit the model to specific data, is there existing code or functions?

MATLAB Release
MATLAB 8.4 (R2014b)
Acknowledgements

Inspired: Quantile Probability Plot

MATLAB Online Live Editor Challenge

Win cash prizes and have your live script featured on our website

Learn more

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video