Skip to content

Behavioral data diffusion analysis

krajcsi edited this page Jan 2, 2020 · 8 revisions

What are diffusion models?

Diffusion models of behavioral data suppose that evidence is accumulated within a trial until a specific threshold is reached, and the response is chosen. Diffusion models suppose several parameters in the background influencing the responses, and these parameters can be recovered with the diffusion analysis.

Find more more details about the diffusion models, for example, in 

Diffusion analysis in CogStat

Currently, CogStat implements the EZ-diffusion model recovery method. See more details in Wagenmakers, E.-J., van der Maas, H. L. J., & Grasman, R. P. P. P. (2007). An EZ-diffusion model for response time and accuracy. Psychonomic Bulletin & Review, 14(1), 3–22. https://doi.org/10.3758/BF03194023.

There are other software packages with advanced features that can recover diffusion model parameters, although they require more conceptual knowledge about the diffusion models and more technical knowledge to perform the analysis compared to the easy-to-run solution provided in CogStat. Find alternative analysis methods in fast-dm, DMAT, HDDM, EZ2 (alternative R version of EZ2, Excel version of EZ2).

How are the parameters recovered?

Based on the reaction time and error data, drift rate, threshold and nondecision time are calculated.

  • In CogStat, first, mean error rates, mean of correct RTs and variance of the correct RTs are calculated. For the mean error rates edge correction is applied (see Wagenmakerset al (2007), p. 11).
  • Then, drift rate, threshold and nondecision time are calculated as described in Wagenmakers et al. (2007).
    • For the parameter s (noise within the trial as evidence is accumulated; a scaling parameter) 0.1 value is used.

How to run a diffusion analysis in CogStat?

Preconditions of running a diffusion analysis

Run the analysis only if these preconditions apply:

  • The task is a two-choice task
  • The core decision of the task is most probably solved in a single step, not with two or more parallel processes or not with sequential steps.

The EZ-diffusion model recovery can be applied only if these additional preconditions apply:

  • The starting point is equidistant from the two thresholds
  • Across trial variability of the parameters are not of interest

If the latter EZ-diffusion model specific preconditions do not apply, you might consider using other software listed above.

Preparing the data

The data should include the trials, i.e., all rows include a single trial.

All rows should include the following variables:

  • ID of the participant
  • One or more condition variables
  • Error
    • Erroneous trials should be coded as 1, and correct trials should be coded as 0.
  • Reaction time
    • It is critical that the time should be measured in seconds, and not in milliseconds or in other units, otherwise the recovered parameters will be incorrect.

For example, the data should look like this:

Participant id Condition Error Reaction time
nom nom nom int
p01 word 1 1.132
p01 word 0 0.974
p01 nonword 0 1.243
p01 word 1 1.086
p01 nonword 0 0.712

Running the analysis

  • Choose Analysis > Behavioral data diffusion analysis
  • Set the variables that include the error, reaction time, participant and condition(s).
    • One or more condition variables can be set. For all other parameters a single variable should be chosen.
  • Find the intermediate descriptive statistics (mean error, mean RT of correct responses, variance of RT of correct responses - first three tables) and the recovered parameters (drift rate, threshold and nondecision time - next three tables) for all participants (rows) and conditions (columns).
    • Note that when the results are copied to a spreadsheet, it might depend on the spreadsheet software whether the table headers are handled correctly. For example, Google Spreadsheet (as of 2020 January) handles the headers correctly, ONLYOFFICE (version 5.4) might miss some condition name rows, and LibreOffice (version 6.3) might mess up the table if the headers are also included.

Documentation for users

Introduction

Using CogStat

Advanced topics

Get help

Documentation for contributors

Statistical and methodological documentation

Documentation for developers

Clone this wiki locally
You can’t perform that action at this time.