The Wald model, also known as the inverse Gaussian, a sequential sampling model for single choice decisions. It is formally equivalent to a drift diffusion model with one decision threshold and no starting point or across Plots drift rate variability.
In this example, we will demonstrate how to use the Wald model in a generic single choice decision task.
using SequentialSamplingModels
using Plots
using Random
The first step is to load the required packages.
using SequentialSamplingModels
using Plots
using Random
Random.seed!(8741)
In the code below, we will define parameters for the Wald Model and create a model object to store the parameter values.
The parameter
ν = 3.0
The parameter
α = 0.50
Non-decision time is an additive constant representing encoding and motor response time.
τ = 0.130
Now that values have been asigned to the parameters, we will pass them to Wald
to generate the model object.
dist = Wald(ν, α, τ)
Now that the model is defined, we will generate rand
.
rts = rand(dist, 1000)
Similarly, the log PDF for each observation can be computed as follows:
pdf.(dist, rts)
Similarly, the log PDF for each observation can be computed as follows:
logpdf.(dist, rts)
The cumulative probability density cdf
.
cdf(dist, .4)
The code below overlays the PDF on reaction time histogram.
histogram(dist)
plot!(dist; t_range=range(.130, 1, length=100))
Anders, R., Alario, F., & Van Maanen, L. (2016). The shifted Wald distribution for response time data analysis. Psychological methods, 21(3), 309.
Folks, J. L., & Chhikara, R. S. (1978). The inverse Gaussian distribution and its statistical application—a review. Journal of the Royal Statistical Society: Series B (Methodological), 40(3), 263-275.
Steingroever, H., Wabersich, D., & Wagenmakers, E. J. (2021). Modeling across-Plots variability in the Wald drift rate parameter. Behavior Research Methods, 53, 1060-1076.