Skip to content

Commit 21b8ac8

Browse files
committed
unify wald model
1 parent 619441b commit 21b8ac8

File tree

10 files changed

+141
-483
lines changed

10 files changed

+141
-483
lines changed

docs/make.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ makedocs(
2626
"Ex-Gaussian" => "ex_gaussian.md",
2727
"Shifted Log Normal" => "shifted_lognormal.md",
2828
"Wald" => "wald.md",
29-
"Wald Mixture" => "wald_mixture.md"
3029
],
3130
"Multi-choice Models" => [
3231
"Single Attribute Models" => [

docs/src/wald.md

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Wald Model
22

3-
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.
3+
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 drift rate variability. The current implementation does include an inter-trial drift rate parameter $\eta$. When $\eta = 0$, the model reduces to the standard Wald model.
44

55
# Example
66
In this example, we will demonstrate how to use the Wald model in a generic single choice decision task.
@@ -21,7 +21,7 @@ using Random
2121
Random.seed!(8741)
2222
```
2323
## Create Model Object
24-
In the code below, we will define parameters for the Wald Model and create a model object to store the parameter values.
24+
In the code below, we will define parameters for the Wald and create a model object to store the parameter values.
2525

2626
### Drift Rate
2727

@@ -30,6 +30,15 @@ The parameter $\nu$ represents the evidence accumulation rate.
3030
```@example wald
3131
ν = 3.0
3232
```
33+
34+
### Drift Rate Variability
35+
36+
The parameter $\eta$ represents the standard deviation of the evidence accumulation rate across trials.
37+
38+
```@example wald
39+
η = 0.20
40+
```
41+
3342
### Threshold
3443

3544
The parameter $\alpha$ the amount of evidence required to make a decision.
@@ -47,7 +56,7 @@ Non-decision time is an additive constant representing encoding and motor respon
4756
Now that values have been asigned to the parameters, we will pass them to `Wald` to generate the model object.
4857

4958
```@example wald
50-
dist = Wald(ν, α, τ)
59+
dist = Wald(ν, η, α, τ)
5160
```
5261
## Simulate Model
5362

@@ -57,7 +66,7 @@ Now that the model is defined, we will generate $10,000$ choices and reaction ti
5766
rts = rand(dist, 1000)
5867
```
5968

60-
## Compute PDF
69+
## Compute PDF
6170
Similarly, the log PDF for each observation can be computed as follows:
6271

6372
```@example wald
@@ -70,7 +79,6 @@ Similarly, the log PDF for each observation can be computed as follows:
7079
```@example wald
7180
logpdf.(dist, rts)
7281
```
73-
7482
## Compute CDF
7583
The cumulative probability density $\Pr(T \leq t)$ is computed by passing the model and a value $t$ to `cdf`.
7684

@@ -88,7 +96,7 @@ plot!(dist; t_range=range(.130, 1, length=100))
8896

8997
Anders, R., Alario, F., & Van Maanen, L. (2016). The shifted Wald distribution for response time data analysis. Psychological methods, 21(3), 309.
9098

91-
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.
99+
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: Statistical Methodology, 40(3), 263-275.
92100

93-
Steingroever, H., Wabersich, D., & Wagenmakers, E. J. (2021). Modeling across-Plots variability in the Wald drift rate parameter. Behavior Research Methods, 53, 1060-1076.
101+
Steingroever, H., Wabersich, D., & Wagenmakers, E. J. (2021). Modeling across-trial variability in the Wald drift rate parameter. Behavior Research Methods, 53, 1060-1076.
94102

docs/src/wald_mixture.md

Lines changed: 0 additions & 98 deletions
This file was deleted.

src/SequentialSamplingModels.jl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ export SSM2D
6767
export stDDM
6868
export ContinuousMultivariateSSM
6969
export Wald
70-
export WaldMixture
7170

7271
export cdf
7372
export compute_choice_probs
@@ -99,8 +98,7 @@ include("utilities.jl")
9998

10099
include("single_choice_models/ex_gaussian.jl")
101100
include("single_choice_models/ShiftedLogNormal.jl")
102-
include("single_choice_models/Wald.jl")
103-
include("single_choice_models/wald_mixture.jl")
101+
include("single_choice_models/wald.jl")
104102

105103
include("multi_choice_models/AttentionalDiffusion.jl")
106104
include("multi_choice_models/ClassicMDFT.jl")

src/single_choice_models/Wald.jl

Lines changed: 0 additions & 104 deletions
This file was deleted.

0 commit comments

Comments
 (0)