File Exchange

image thumbnail

Drift Diffusion Process

version 1.0.0.0 (2.39 KB) by Valerio Biscione
Simulating the drift diffusion process (variability across trial)

5 Downloads

Updated 18 Dec 2014

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

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 Compatibility
Created with R2014b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Acknowledgements

Inspired: Quantile Probability Plot

Discover Live Editor

Create scripts with code, output, and formatted text in a single executable document.


Learn About Live Editor