SequentialSamplingModels.jl

Overview

This package provides a unified interface for simulating and evaluating popular sequential sampling models (SSMs), which integrates with the following packages:

Background

SSMs, also known as an evidence accumulation models, are a broad class of dynamic models of human decision making in which evidence for each option accumulates until the evidence for one option reaches a decision threshold. Models within this class make different assumptions about the nature of the evidence accumulation process. An example of the evidence accumulation process is illustrated below for the Leaking Competing Accumulator (LCA):

Installation

You can install a stable version of SequentialSamplingModels by running the following in the Julia REPL:

] add SequentialSamplingModels

The package can then be loaded with:

using SequentialSamplingModels

Quick Example

The example belows shows how to perform three common tasks:

  1. generate simulated data
  2. evaluate the log likelihood of data
  3. plot the predictions of the model
using SequentialSamplingModels
using Plots
using Random

Random.seed!(2054)

# Create LBA distribution with known parameters
dist = LBA(; ν=[2.75,1.75], A=0.8, k=0.5, τ=0.25)
# Sample 10,000 simulated data from the LBA
sim_data = rand(dist, 10_000)
# compute log likelihood of simulated data
logpdf(dist, sim_data)
# Plot the RT distribution for each choice
histogram(dist)
plot!(dist; t_range=range(.3,2.5, length=100), xlims=(0, 2.5))
Example block output

References

Evans, N. J. & Wagenmakers, E.-J. Evidence accumulation models: Current limitations and future directions. Quantitative Methods for Psychololgy 16, 73–90 (2020).

Forstmann, B. U., Ratcliff, R., & Wagenmakers, E. J. (2016). Sequential sampling models in cognitive neuroscience: Advantages, applications, and extensions. Annual Review of Psychology, 67, 641-666.

Jones, M., & Dzhafarov, E. N. (2014). Unfalsifiability and mutual translatability of major modeling schemes for choice reaction time. Psychological Review, 121(1), 1.