This package provides a unified interface for simulating and evaluating sequential sampling models (SSMs) in Julia. SSMs describe decision making as a stochastic and dynamic evidence accumulation process in which a decision is triggered by the option whose evidence hits a decision treshold first.
A summary of the core features is provided below. Please see the documentation for more information.
The following SSMs are supported:
- Attentional Drift Diffusion
- Leaky Competing Accumulator
- Drift Diffusion
- Linear Ballistic Accumulator
- Log Normal Race
- Poisson Race
- Racing Diffusion
- Multi-attribute Attentional Drift Diffusion
- Multi-attribute Decision Field Theory
- Multi-attribute Linear Ballistic Accumulator
The core API consists of the following
- rand: generate simulated data
- pdf: evaluate the probability density of the data
- logpdf: evaluate the log probability density of the data
- simulate: generate samples from the internal evidence accumulation process
SSMs work with the following packages (and possibly more):
- Distributions.jl: functions for probability distributions
- Pigeons.jl: Bayesian parameter estimation and Bayes factors
- Plots.jl: extended plotting tools for SSMs
- Turing.jl: Bayesian parameter estimation
You can install a stable version of SequentialSamplingModels by running the following in the Julia REPL:
] add SequentialSamplingModelsIn the example below, we instantiate a Linear Ballistic Accumulator (LBA) model, and generate data from it.
using SequentialSamplingModels
# Create LBA distribution with known parameters
dist = LBA(; ν=[2.75,1.75], A=0.8, k=0.5, τ=0.25)
# Sample 1000 random data points from this distribution
choice, rt = rand(dist, 1000)If you use SequentialSamplingModels.jl in your research, please cite the following paper:
Fernandez, K., Makowski, D., & Fisher, C. (2025). SequentialSamplingModels.jl: Simulating and evaluating cognitive models of response times in Julia. Proceedings of the JuliaCon Conferences, 7(78), 186. https://doi.org/10.21105/jcon.00186
@article{fisher2025sequentialsamplingmodels,
title = {SequentialSamplingModels.jl: Simulating and Evaluating Cognitive Models of Response Times in Julia},
author = {Fernandez, Kiant{\'e} and Makowski, Dominique and Fisher, Christopher},
journal = {Proceedings of the JuliaCon Conferences},
year = {2025},
volume = {7},
number = {78},
pages = {186},
doi = {10.21105/jcon.00186},
url = {https://doi.org/10.21105/jcon.00186},
publisher = {The Open Journal}
}
