Ruprecht-Karls-Universität Heidelberg
Diffusion Model Plot

Diffusion Model Analysis with fast-dm-30

This web page is the home of fast-dm, a program for fast parameter estimation of Ratcliff's (1978) diffusion model. The program was written by Jochen Voss and Andreas Voss.


fast-dm Downloads

Fast-dm is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License. See the file COPYING in the source code archives for details.

We provide the source code, precompiled binaries (for Windows only), and a MS Visual Studio project. If you just want to apply fast-dm and you are using MS Windows, you will only need the binaries.


Fast-dm-30.2 implements an guessing parameter p (see Ratcliff & Tuerlincks, 2004). p estimates the amout of guessings in your data with the assumtion of an equal RT distribution of guesses between the fastes and the slowest response. For most applications, you want to set p to 0, especially when using small trial numbers.

Additionally, fast-dm-30.2 comprises some minor corrections of code.

Note: The file win32erf.c, needs to be included only if an elder version of Visual Studio is used for compilation.

Fast-dm-30.2 with MS GUI

Stefan Radev and Veronika Lerche developed a Python-based graphical user interface for fast-dm. The GUI has the same functionality as the command-line version of fast-dm. In addition, the GUI allows the creation of plots that are useful to check the model fit. Note that the plots feature is still under development. Dependencies are not yet included and further plot options will be added in the near future. Further information on this project (including installation instructions) can be found on GitHub


Installation on Unix-like systems

  • Download and unzip the source
  • Open a terminal and cd into the directory
  • Type ./configure
  • Type make

A very short Introduction to Diffusion Modeling

Diffusion-model data analyses are based on the assumption that information is accumulated continuously until one of two thresholds is hit. With a diffusion-model data analysis it is possible to analyze data from fast binary decision tasks. The analysis is based on the distributions of both correct and erroneous responses. From these distributions a set of parameters is estimated that allows to draw conclusions about the underlying cognitive processes. For more information, see Voss, Rothermund, & Voss (2004) or Voss, Nagler, & Lerche (2013) (Password is VOSS).

Parameters estimated by fast-dm

Parameter Typical Range Description Notes
Threshold Separation (a) 0.5 < a < 2 Amount of information that is considered for a decision. Large values indicate a conservative decisional style.
Relative Starting Point (zr) 0.3 < zr < 0.7 Indicator of an a priori bias in decision making. When the relative starting point zr deviates from 0.5, the amount of information necessary for a decision differs between response alternatives. In earlier versions of fast-dm the absolute starting point z was estimated. In recent versions, fast-dm uses zr = z/a, which is scaled from 0 to 1 with zr = 0.5 indicating the absence of a decisional bias.
Drift (v) -5 < v < 5 Average slope of the information accumulation process. The drift gives information about the speed and direction of the accumulation of information. Large (absolute) values of drift indicate a good performance. If received information supports the response linked to the upper threshold the sign will be positive and vice versa.
Response Time Constant (t0) 0.1 < t0 < 0.5 Average duration of all non-decisional processes (encoding and response execution). Duration is given in seconds by fast-dm.
Differences in Speed of Response Execution (d) -0.1 < d < 0.1 Positive values indicate that response execution is faster for responses linked to the upper threshold (coded as 1 in fast-dm) than for responses linked to the lower threshold. Differences are given in seconds by fast-dm.
Inter-Trial-Variability of (Relative) Starting Point (szr) 0 < szr < 0.5 Range of a uniform distribution with mean zr describing the distribution of actual starting points from specific trials. Minimal impact on the RT distributions. Can be fixed to 0 in most applications.
Inter-Trial-Variability of Drift (sv) 0 < sv < 2 Standard deviation of a normal distribution with mean v describing the distribution of actual drift rates from specific trials. Minimal impact on the RT distributions. Can be fixed to 0 in most applications.
Inter-Trial-Variability of Non-Decisional Components (st0) 0 < st0 < 0.2 Range of a uniform distribution with mean t0 describing the distribution of actual t0 values across trials. Accounts for response times below t0. Reduces skew of predicted RT distributions.
Percentage of Contaminants (p) 0 < p < 1 Contaminated RTs are modeled as a uniform distribution form the fastest to the slowest RT (Ratcliff & Tuerlinckx, 2004). p is an estimate for the relative amount of contaminated trials. Very large trial numbers are needed to estmate p. Should be fixed to 0 in most applications. Implemented in fast-dm-30.2

Estimation Procedures implemented in fast-dm

Method Recommended Trial Number (Minimum) Robustness Speed of Estimation
Maximum Likelihood Low (n>40) Low (strict outlier analysis necessary) Low (if inter-trial-variability parameters are included)
Kolmogorov-Smirnov Medium (n>100) High Medium (dependent on trial numbers)
Chi-Square High (n>500) High High (independent of trial numbers)

A very short Introduction to fast-dm

Fast-dm is free open-source software for the estimation of diffusion model parameters. It is a command-line tool that reads commands from a text file (by default named experiment.ctl). Below, we present an overview of possible commands for the control file. A more thorough description is provided by Voss & Voss (2007).

To run fast-dm you have to save the control file, all your data files and fast-dm.exe in the same directory. Then you can start fast-dm by a double click. However, we recommend starting it from a command window so that you have a chance to inspect possible error messages. You can give the name of the control file as an option (e.g., enter fast-dm exp1.ctl); if no option is entered, fast-dm tries to load the file experiment.ctl.

Commands for the Control File

Command Explanation Examples
method CRITERION Selection of estimation procedure (Maximum Likelihood; Kolmogorov-Smirnov; Chi-Square).
  • method ml
  • method ks
  • method cs
precision VALUE Precision of calculation. VALUE corresponds roughly to the number of decimals of the predicted CDFs that are calculated accuratly.
  • precision 2.5
  • precision 5.0
set PARAMETER VALUE Fix a parameter to a specific value; this parameter will not be estimated by fast-dm.
  • set zr 0.5
  • set d 0
depends PARAMETER CONDITION Denotes that this parameter may vary between different trial types or conditions. CONDITION need to be defined later by the format command
  • depends v stimulus
  • depends a block
format CONDITION ... Defines the variable names for the columns of the data file(s). The format command is always required, and you need to define always the variables RESPONSE and TIME (using capital letters). In the data files, responses have to be coded as 0 (lower threshold) or 1 (upper threshold). Times have to be given in seconds (not: ms!).
  • format block stimulus RESPONSE TIME
  • format * * RESPONSE TIME
load FILE_NAME Defines the names of input files (required command).
  • load data.dat
  • load *.dat
save FILE_NAME Defines the names of separate output files (one output file for each data set). Either the save or the log command are required.
  • save parameter.dat
  • save *.par
log FILE_NAME Defines the names of a common output file (one output file for all data sets). Either the save or the log command are required.
  • log parameter.lst
Note: Commands in bold font are required; all other commands are optional.

Example of a complete control file

method ks
precision 3
set zr 0.5
set d 0
set szr 0
set sv 0
set p 0
depends v stimulus
format stimulus RESPONSE TIME
load *.dat
log parameter.lst

A very short Introduction to construct-samples

Construct-samples is a tool that comes along with fast-dm to simulate data sets from a specific parameter set. Parameter values are entered as command-line options.

Command-Line options of construct-samples

Option Description
-a VALUE threshold separation
-z VALUE relative starting point
-v VALUE drift
-t VALUE duration of non-decisional processes
-d VALUE difference in speed of response execution
-Z VALUE inter-trial variability of relative starting point
-V VALUE inter-trial variability of drift
-T VALUE inter-trial variability of non-decisional processes
-p VALUE precision
-n VALUE trial number per data set
-N VALUE number of data sets
-r responses and times are randomly determined
-o FILE_NAME file name(s) for output

Example of the usage of construct-samples

construct-samples.exe -a 1.2 -z 0.5 -v 1 -t 0.300 -d 0 -Z 0 -V 0 -T 0.1 -r -n 500 -N 1000 -o "%d.lst"

A very short Introduction to plot-cdf

Plot-cdf is a tool that comes along with fast-dm to visualize the predicted cumulative distribution functions for a specific parameter set. Parameter values are entered as command-line options (see above; -r, -n, -N do not apply for plot-cdf). The program gives values for the CDF as plain text that can be plotted using different software like Excel or R.

Example of the usage of plot-cdf

plot-cdf.exe -a 1.2 -z 0.5 -v 1 -t 0.300 -d 0 -Z 0 -V 0 -T 0.1 -o "cdf.lst"


Below, you will find three examples that may be helpful for your first steps using fast-dm. Each ZIP archive contains some data files, the experiment.ctl file, and the fast-dm.exe file. Additionally you find the R-code that has been used to generate the data files (calling construct-samples).

Short Introduction

  • Download, save, and un-zip the archiev
  • Open a Command Window
  • Go to the example's directory (using "cd")
  • Type "fast-dm[RETURN]" to start the program (alternatively, use a double click on the icon in the directory)
  • Results are saved in the log files (e.g., "exp1.log") that can be read in any statistical software for further analysis

Example 1

Twenty data files with 200 trials each are simulated from the same parameter values (a=1; zr=0.5; v=2; t0=0.5; other parameters are zero)


Example 2

Simulates an experiment with 4 conditions with different drift rates (a=1; zr=0.5; v1=-3; v2=-1; v3=1; v4=3; t0=0.5; other parameters are zero)


Example 3

One-hundred data sets with 500 trials each with randomly generated parameter values. The file true-scores.lst contains the values that have been used for the simulation.


Recent diffusion model publications from our group

Please note that some of the texts available here are protected by a password. In this case VOSS will help you!

  • Böhm, U., Annis, J., Frank, M., Hawkins, G., Heathcote, A., Kellen, D., Krypotos, A., Lerche, V. Logan, G. Palmeri, T., van Ravenzwaaij, D., Servant, M. Singmann, H., Starns, J., Voss, A., Wiecki, T., Matzke, D., Wagenmakers E.-J. (in press). Estimating Across-Trial Variability Parameters of the Diffusion Decision Model: Expert Advice and Recommendations. Journal of Mathematical Psychology. [pdf]
  • Dutilh, G., Annis, J., Brown, S. D., Cassey, P., Evans, N. J., Grasman, R. P. P. P., Hawkins, G. E., Heathcote, A., Holmes, W. R., Krypotos, A.-M., Kupitz, C. N., Leite, F. P., Lerche, V., Lin, Y.-S., Logan, G. D., Palmeri, T. J., Starns, J. J., Trueblood, J. S., van Maanen, L., van Ravenzwaaij, D., Vandekerckhove, J., Visser, I., Voss, A., White C. N., Wiecki T. V., Rieskamp, J., & Donkin, C. (in press). The Quality of Response Time Data Inference: A Blinded, Collaborative Assessment of the Validity of Cognitive Models. Psychonomic Bulletin & Review. doi: 10.3758/s13423-017-1417-2
  • Lerche, V. & Voss, A. (in press). Experimental Validation of the Diffusion Model based on a Slow Response Time Paradigm. Psychological Research. [pdf]
  • Lerche, V., & Voss, A. (in press). Speed-Accuracy Manipulation in Diffusion Modeling: Lack of Discriminant Validity of the Manipulation or the Parameter Estimates? Behavior Research Methods.
  • Lerche, V., Christmann, U., & Voss, A. (in press). Impact of Context Information on Metaphor Elaboration: A Diffusion Model Study. Experimental Psychology.
  • Janczyk, M., & Lerche, V. (2018). A diffusion model analysis of the response-effect compatibility effect. Journal of Experimental Psychology: General. doi: 10.1037/xge0000430
  • Lerche, V., Neubauer, A. B., & Voss, A. (2018). Effects of Implicit Fear of Failure on Cognitive Processing: A Diffusion Model Analysis. Motivation and Emotion, 42(3), 386-402. doi: 10.1007/s11031-018-9691-5
  • Lerche, V., & Voss, A. (2018). Speed-Accuracy Manipulation in Diffusion Modeling: Lack of Discriminant Validity of the Manipulation or the Parameter Estimates? Behavior Research Methods, 1-18. doi: 10.3758/s13428-018-1034-7
  • Lerche, V. & Voss, A. (2017). Experimental Validation of the Diffusion Model based on a Slow Response Time Paradigm. Psychological Research. doi: 10.1007/s00426-017-0945-8
  • Lerche, V., & Voss, A. (2017). Retest Reliability of the Parameters of the Ratcliff Diffusion Model. Psychological Research, 81(3), 629-652. doi: 10.1007/s00426-016-0770-5
  • Lerche, V., Voss, A., & Nagler, M. (2017). How Many Trials are Required for Robust Parameter Estimation in Diffusion Modeling? A Comparison of Different Estimation Algorithms. Behavior Research Methods, 49(2), 513-537. doi: 10.3758/s13428-016-0740-2
  • Schubert, A. L., Hagemann, D., Voss, A., & Bergmann, K. (2017). Evaluating the model fit of diffusion models with the root mean square error of approximation. Journal of Mathematical Psychology, 77, 29-45. [pdf]
zum Seitenanfang
Seitenbearbeiter: Andreas Voß