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