You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/wald.md
+15-7Lines changed: 15 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Wald Model
2
2
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.
4
4
5
5
# Example
6
6
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
21
21
Random.seed!(8741)
22
22
```
23
23
## 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.
25
25
26
26
### Drift Rate
27
27
@@ -30,6 +30,15 @@ The parameter $\nu$ represents the evidence accumulation rate.
30
30
```@example wald
31
31
ν = 3.0
32
32
```
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
+
33
42
### Threshold
34
43
35
44
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
47
56
Now that values have been asigned to the parameters, we will pass them to `Wald` to generate the model object.
48
57
49
58
```@example wald
50
-
dist = Wald(ν, α, τ)
59
+
dist = Wald(ν, η, α, τ)
51
60
```
52
61
## Simulate Model
53
62
@@ -57,7 +66,7 @@ Now that the model is defined, we will generate $10,000$ choices and reaction ti
57
66
rts = rand(dist, 1000)
58
67
```
59
68
60
-
## Compute PDF
69
+
## Compute PDF
61
70
Similarly, the log PDF for each observation can be computed as follows:
62
71
63
72
```@example wald
@@ -70,7 +79,6 @@ Similarly, the log PDF for each observation can be computed as follows:
70
79
```@example wald
71
80
logpdf.(dist, rts)
72
81
```
73
-
74
82
## Compute CDF
75
83
The cumulative probability density $\Pr(T \leq t)$ is computed by passing the model and a value $t$ to `cdf`.
Anders, R., Alario, F., & Van Maanen, L. (2016). The shifted Wald distribution for response time data analysis. Psychological methods, 21(3), 309.
90
98
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.
92
100
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.
0 commit comments