Skip to content

itsdfish/SequentialSamplingModels.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CI CodeCov DOI

SequentialSamplingModels

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.

Feature Overview

A summary of the core features is provided below. Please see the documentation for more information.

Supported Models

The following SSMs are supported:

Single Choice Models

Multi-Choice Models

Single Attribute

Multi-Attribute

Alternative Geometries

API

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

Ecosystem Integration

SSMs work with the following packages (and possibly more):

Installation

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

] add SequentialSamplingModels

Quick Example

In 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)

Citation

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}
}