SequentialSamplingModels.SequentialSamplingModels
— ModuleSequentialSamplingModels.jl
A collection of sequential sampling models based on the Distributions.jl API.
Currently Supported models
LBA
: Linear Ballistic AccumulatorLNR
: Lognormal Race ModelWald
: a shifted Wald represented a single boundary diffusion processWaldMixture
: a shifted Wald represented a single boundary diffusion process with across-trial variability in the drift rateAttentionalDiffusion
: a drift diffusion model in which the accumulation process is determined by the
utility of a visually attended option
SequentialSamplingModels.AttentionalDiffusion
— TypeAttentionalDiffusion(;ν1=5.0, ν2=4.0, α=1.0, z=α*.5, θ=.6, σ=.05, Δ=.005)
Constructor for attentional diffusion model object.
Keywords
ν1=5.0
: relative decision value for alternative 1ν2=4.0
: relative decision value for alternative 2α=1.0
: evidence thresholdz=0.0
: initial evidenceθ=.3
: bias towards attended alternative (lower indicates more bias)σ=.02
: standard deviation of noise in evidence accumulationΔ=.0004
: constant of evidence accumulation speed (evidence per ms)
References
Krajbich, I., Armel, C., & Rangel, A. (2010). Visual fixations and the computation and comparison of value in simple choice. Nature neuroscience, 13(10), 1292-1298.
SequentialSamplingModels.DiffusionRace
— TypeDiffusionRace(;ν, k, A, θ)
An object for the racing diffusion model.
Fields
ν
: a vector of drift ratesk
: k = b - A where b is the decision threshold, and A is the maximum starting pointA
: the maximum starting point diffusion process, sampled from Uniform distributionθ
: a encoding-motor time offset
Example
using SequentialSamplingModels
dist = DiffusionRace(;ν=[1,2], k=.3, A=.7, θ=.2)
data = rand(dist, 10)
like = pdf.(dist, data)
loglike = logpdf.(dist, data)
References
Tillman, G., Van Zandt, T., & Logan, G. D. (2020). Sequential sampling models without random between-trial variability: The racing diffusion model of speeded decision making. Psychonomic Bulletin & Review, 27, 911-936.
SequentialSamplingModels.LBA
— TypeLBA(;τ, A, k, ν, σ=1.0)
A model object for the linear ballistic accumulator.
Fields
ν
: a vector of drift ratesA
: max start pointk
: A + k = b, where b is the decision thresholdσ=1
: drift rate standard deviationτ
: a encoding-response offset
Example
using SequentialSamplingModels
dist = LBA(ν=[3.0,2.0], A = .8, k = .2, τ = .3)
choice,rt = rand(dist, 10)
like = pdf.(dist, choice, rt)
loglike = logpdf.(dist, choice, rt)
References
Brown, S. D., & Heathcote, A. (2008). The simplest complete model of choice response time: Linear ballistic accumulation. Cognitive psychology, 57(3), 153-178.
SequentialSamplingModels.LNR
— TypeLNR(;μ, σ, ϕ)
A lognormal race model object
Fields
μ
: a vector of means in log-spaceσ
: a standard deviation parameter in log-spaceϕ
: a encoding-response offset
Example
using SequentialSamplingModels
dist = LNR(μ=[-2,-3], σ=1.0, ϕ=.3)
data = rand(dist, 10)
like = pdf.(dist, data)
loglike = logpdf.(dist, data)
References
Rouder, J. N., Province, J. M., Morey, R. D., Gomez, P., & Heathcote, A. (2015). The lognormal race: A cognitive-process model of choice and latency with desirable psychometric properties. Psychometrika, 80(2), 491-513.
SequentialSamplingModels.Wald
— TypeWald Constructor
υ
: drift rateα
: decision thresholdθ
: a encoding-response offset
Usage
using SequentialSamplingModels
dist = Wald(υ=3.0, α=.5, θ=.130)
rt = rand(dist, 10)
like = pdf.(dist, rt)
loglike = logpdf.(dist, rt)
SequentialSamplingModels.WaldA
— TypeWaldA(;ν, k, A, θ)
Constructor for Wald distribution
Fields
ν
: drift ratek
: k = b - A where b is the decision threshold, and A is the maximum starting pointA
: the maximum starting point diffusion process, sampled from Uniform distributionθ
: a encoding-motor time offset
Usage
using SequentialSamplingModels
dist = WaldA(ν=.5, σ=1.0, ϕ=.3)
data = rand(dist, 10)
like = pdf.(dist, data)
loglike = logpdf.(dist, data)
References
Tillman, G., Van Zandt, T., & Logan, G. D. (2020). Sequential sampling models without random between-trial variability: The racing diffusion model of speeded decision making. Psychonomic Bulletin & Review, 27, 911-936.
SequentialSamplingModels.WaldMixture
— TypeWaldMixture Constructor
υ
: drift rateσ
: standard deviation of drift rateα
: decision thresholdθ
: a encoding-response offset
Usage
using SequentialSamplingModels
dist = WaldMixture(υ=3.0, σ=.2, α=.5, θ=.130)
rt = rand(dist, 10)
like = pdf.(dist, rt)
loglike = logpdf.(dist, rt)
References
Steingroever, H., Wabersich, D., & Wagenmakers, E. J. (2020). Modeling across-trial variability in the Wald drift rate parameter. Behavior Research Methods, 1-17.
Base.rand
— Methodrand(dist::AttentionalDiffusion, fixation, args...; kwargs...)
Generate a single simulated trial from the attention diffusion model.
Arguments
dist
: an attentional diffusion model objectfixation
: a function of the visual fixation process which returns 1 for alternative and 2 for alternative 2args...
: optional positional arguments for thefixation
function
Keywords
kwargs...
: optional keyword arguments for thefixation
function
Base.rand
— Methodrand(dist::AttentionalDiffusion, n_sim::Int, fixation, args...; kwargs...)
Generate n_sim
simulated trials from the attention diffusion model.
Arguments
dist
: an attentional diffusion model objectn_sim::Int
: the number of simulated trialsfixation
: a function of the visual fixation process which returns 1 for alternative and 2 for alternative 2args...
: optional positional arguments for thefixation
function
Keywords
kwargs...
: optional keyword arguments for thefixation
function