itsdfish / SequentialSamplingModels.jl

A unified interface for simulating and evaluating sequential sampling models in Julia.
https://itsdfish.github.io/SequentialSamplingModels.jl/dev/
MIT License
27 stars 4 forks source link
attentional-drift-diffusion circular-drift-diffusion drift-diffusion-model ex-gaussian julia julia-lang julia-language lba leaky-competing-accumulator linear-ballistic-accumulator lnr lognormal-race-model multi-attribute-decision-field-theory multi-attribute-linear-ballistic-accumulator poisson-race racing-diffusion shifted-lognormal shifted-wald

CI

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

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)