-
-
Notifications
You must be signed in to change notification settings - Fork 129
Expand file tree
/
Copy pathpositive_lower-bounded_distributions.qmd
More file actions
441 lines (319 loc) · 20.4 KB
/
positive_lower-bounded_distributions.qmd
File metadata and controls
441 lines (319 loc) · 20.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
---
pagetitle: Positive Lower-Bounded Distributions
---
# Positive Lower-Bounded Distributions
The positive lower-bounded probabilities have support on real values
above some positive minimum value.
## Pareto distribution
### Probability density function
If $y_{\text{min}} \in \mathbb{R}^+$ and $\alpha \in \mathbb{R}^+$,
then for $y \in \mathbb{R}^+$ with $y \geq y_{\text{min}}$,
\begin{equation*}
\text{Pareto}(y|y_{\text{min}},\alpha) = \frac{\displaystyle \alpha\,y_{\text{min}}^\alpha}{\displaystyle y^{\alpha+1}}.
\end{equation*}
### Distribution statement
`y ~ ` **`pareto`**`(y_min, alpha)`
Increment target log probability density with `pareto_lupdf(y | y_min, alpha)`.
{{< since 2.0 >}}
<!-- real; pareto ~; -->
\index{{\tt \bfseries pareto }!sampling statement|hyperpage}
### Stan functions
<!-- real; pareto_lpdf; (reals y | reals y_min, reals alpha); -->
\index{{\tt \bfseries pareto\_lpdf }!{\tt (reals y \textbar\ reals y\_min, reals alpha): real}|hyperpage}
`real` **`pareto_lpdf`**`(reals y | reals y_min, reals alpha)`<br>\newline
The log of the Pareto density of y given positive minimum value y_min
and shape alpha
{{< since 2.12 >}}
<!-- real; pareto_lupdf; (reals y | reals y_min, reals alpha); -->
\index{{\tt \bfseries pareto\_lupdf }!{\tt (reals y \textbar\ reals y\_min, reals alpha): real}|hyperpage}
`real` **`pareto_lupdf`**`(reals y | reals y_min, reals alpha)`<br>\newline
The log of the Pareto density of y given positive minimum value y_min
and shape alpha dropping constant additive terms
{{< since 2.25 >}}
<!-- real; pareto_cdf; (reals y | reals y_min, reals alpha); -->
\index{{\tt \bfseries pareto\_cdf }!{\tt (reals y \textbar\ reals y\_min, reals alpha): real}|hyperpage}
`real` **`pareto_cdf`**`(reals y | reals y_min, reals alpha)`<br>\newline
The Pareto cumulative distribution function of y given positive
minimum value y_min and shape alpha
{{< since 2.0 >}}
<!-- real; pareto_lcdf; (reals y | reals y_min, reals alpha); -->
\index{{\tt \bfseries pareto\_lcdf }!{\tt (reals y \textbar\ reals y\_min, reals alpha): real}|hyperpage}
`real` **`pareto_lcdf`**`(reals y | reals y_min, reals alpha)`<br>\newline
The log of the Pareto cumulative distribution function of y given
positive minimum value y_min and shape alpha
{{< since 2.12 >}}
<!-- real; pareto_lccdf; (reals y | reals y_min, reals alpha); -->
\index{{\tt \bfseries pareto\_lccdf }!{\tt (reals y \textbar\ reals y\_min, reals alpha): real}|hyperpage}
`real` **`pareto_lccdf`**`(reals y | reals y_min, reals alpha)`<br>\newline
The log of the Pareto complementary cumulative distribution function
of y given positive minimum value y_min and shape alpha
{{< since 2.12 >}}
<!-- R; pareto_rng; (reals y_min, reals alpha); -->
\index{{\tt \bfseries pareto\_rng }!{\tt (reals y\_min, reals alpha): R}|hyperpage}
`R` **`pareto_rng`**`(reals y_min, reals alpha)`<br>\newline
Generate a Pareto variate with positive minimum value y_min and shape
alpha; may only be used in transformed data and generated quantities blocks. For a
description of argument and return types, see section
[vectorized PRNG functions](conventions_for_probability_functions.qmd#prng-vectorization).
{{< since 2.18 >}}
## Pareto type 2 distribution
### Probability density function
If $\mu \in \mathbb{R}$, $\lambda \in \mathbb{R}^+$, and
$\alpha \in \mathbb{R}^+$, then for $y \geq \mu$,
\begin{equation*}
\mathrm{Pareto\_Type\_2}(y|\mu,\lambda,\alpha) =
\ \frac{\alpha}{\lambda} \, \left( 1+\frac{y-\mu}{\lambda} \right)^{-(\alpha+1)} \! .
\end{equation*}
Note that the Lomax distribution is a Pareto Type 2 distribution with
$\mu=0$.
### Distribution statement
`y ~ ` **`pareto_type_2`**`(mu, lambda, alpha)`
Increment target log probability density with `pareto_type_2_lupdf(y | mu, lambda, alpha)`.
{{< since 2.5 >}}
<!-- real; pareto_type_2 ~; -->
\index{{\tt \bfseries pareto\_type\_2 }!sampling statement|hyperpage}
### Stan functions
<!-- real; pareto_type_2_lpdf; (reals y | reals mu, reals lambda, reals alpha); -->
\index{{\tt \bfseries pareto\_type\_2\_lpdf }!{\tt (reals y \textbar\ reals mu, reals lambda, reals alpha): real}|hyperpage}
`real` **`pareto_type_2_lpdf`**`(reals y | reals mu, reals lambda, reals alpha)`<br>\newline
The log of the Pareto Type 2 density of y given location mu, scale
lambda, and shape alpha
{{< since 2.18 >}}
<!-- real; pareto_type_2_lupdf; (reals y | reals mu, reals lambda, reals alpha); -->
\index{{\tt \bfseries pareto\_type\_2\_lupdf }!{\tt (reals y \textbar\ reals mu, reals lambda, reals alpha): real}|hyperpage}
`real` **`pareto_type_2_lupdf`**`(reals y | reals mu, reals lambda, reals alpha)`<br>\newline
The log of the Pareto Type 2 density of y given location mu, scale
lambda, and shape alpha dropping constant additive terms
{{< since 2.25 >}}
<!-- real; pareto_type_2_cdf; (reals y | reals mu, reals lambda, reals alpha); -->
\index{{\tt \bfseries pareto\_type\_2\_cdf }!{\tt (reals y \textbar\ reals mu, reals lambda, reals alpha): real}|hyperpage}
`real` **`pareto_type_2_cdf`**`(reals y | reals mu, reals lambda, reals alpha)`<br>\newline
The Pareto Type 2 cumulative distribution function of y given location
mu, scale lambda, and shape alpha
{{< since 2.5 >}}
<!-- real; pareto_type_2_lcdf; (reals y | reals mu, reals lambda, reals alpha); -->
\index{{\tt \bfseries pareto\_type\_2\_lcdf }!{\tt (reals y \textbar\ reals mu, reals lambda, reals alpha): real}|hyperpage}
`real` **`pareto_type_2_lcdf`**`(reals y | reals mu, reals lambda, reals alpha)`<br>\newline
The log of the Pareto Type 2 cumulative distribution function of y
given location mu, scale lambda, and shape alpha
{{< since 2.18 >}}
<!-- real; pareto_type_2_lccdf; (reals y | reals mu, reals lambda, reals alpha); -->
\index{{\tt \bfseries pareto\_type\_2\_lccdf }!{\tt (reals y \textbar\ reals mu, reals lambda, reals alpha): real}|hyperpage}
`real` **`pareto_type_2_lccdf`**`(reals y | reals mu, reals lambda, reals alpha)`<br>\newline
The log of the Pareto Type 2 complementary cumulative distribution
function of y given location mu, scale lambda, and shape alpha
{{< since 2.18 >}}
<!-- R; pareto_type_2_rng; (reals mu, reals lambda, reals alpha); -->
\index{{\tt \bfseries pareto\_type\_2\_rng }!{\tt (reals mu, reals lambda, reals alpha): R}|hyperpage}
`R` **`pareto_type_2_rng`**`(reals mu, reals lambda, reals alpha)`<br>\newline
Generate a Pareto Type 2 variate with location mu, scale lambda, and
shape alpha; may only be used in transformed data and generated quantities blocks.
For a description of argument and return types, see section
[vectorized PRNG functions](conventions_for_probability_functions.qmd#prng-vectorization).
{{< since 2.18 >}}
## Wiener First Passage Time Distribution
For an extended explanation of how to use the `wiener_lpdf` and
`wiener_l[c]cdf_unnorm` functions, see @Henrich2024.
### Probability density function
If $\alpha \in \mathbb{R}^+$, $\tau \in \mathbb{R}^+$, $\beta \in (0, 1)$,
$\delta \in \mathbb{R}$, $s_{\delta} \in \mathbb{R}^{\geq 0}$, $s_{\beta} \in [0, 1)$, and
$s_{\tau} \in \mathbb{R}^{\geq 0}$ then for $y > \tau$,
\begin{equation*}
\begin{split}
&\text{Wiener}(y\mid \alpha,\tau,\beta,\delta,s_{\delta},s_{\beta},s_{\tau}) =
\\
&\frac{1}{s_{\tau}}\int_{\tau}^{\tau+s_{\tau}}\frac{1}{s_{\beta}}\int_{\beta-\frac{1}{2}s_{\beta}}^{\beta+\frac{1}{2}s_{\beta}}\int_{-\infty}^{\infty} p_3(y-{\tau_0}\mid \alpha,\nu,\omega)
\\
&\times \frac{1}{\sqrt{2\pi s_{\delta}^2}}\exp\Bigl(-\frac{(\nu-\delta)^2}{2s_{\delta}^2}\Bigr) \,d\nu \,d\omega \,d{\tau_0}=
\\
&\frac{1}{s_{\tau}}\int_{\tau}^{\tau+s_{\tau}}\frac{1}{s_{\beta}}\int_{\beta-\frac{1}{2}s_{\beta}}^{\beta+\frac{1}{2}s_{\beta}} M\times p_3(y-{\tau_0}\mid \alpha,\nu,\omega) \,d\omega \,d{\tau_0},
\end{split}
\end{equation*}
where $p()$ denotes the density function, and $M$ and $p_3()$ are defined, by using $t:=y-{\tau_0}$, as
\begin{equation*}
M \coloneqq \frac{1}{\sqrt{1+s_{\delta}^2t}}\exp\Bigl(\alpha{\delta}\omega+\frac{\delta^2t}{2}+\frac{s_{\delta}^2\alpha^2\omega^2-2\alpha{\delta}\omega-\delta^2t}{2(1+s_{\delta}^2t)}\Bigr)\text{ and}
\end{equation*}
\begin{equation*}
p_3(t\mid \alpha,\delta,\beta) \coloneqq \frac{1}{\alpha^2}\exp\Bigl(-\alpha\delta\beta-\frac{\delta^2t}{2}\Bigr)f(\frac{t}{\alpha^2}\mid 0,1,\beta),
\end{equation*}
where $f(t^*=\frac{t}{\alpha^2}\mid0,1,\beta)$ can be specified in two ways:
\begin{equation*}
f_l(t^*\mid 0,1,\beta) = \sum_{k=1}^\infty k\pi \exp\Bigl(-\frac{k^2\pi^2t^*}{2}\Bigr)\sin(k\pi \beta)\text{ and}
\end{equation*}
\begin{equation*}
f_s(t^*\mid0,1,\beta) = \sum_{k=-\infty}^\infty \frac{1}{\sqrt{2\pi(t^*)^3}}(\beta+2k) \exp\Bigl(-\frac{(\beta+2k)^2}{2t^*}\Bigr).
\end{equation*}
Which of these is used in the computations depends on which expression requires the smaller number of components $k$ to guarantee a pre-specified precision
In the case where $s_{\delta}$, $s_{\beta}$, and $s_{\tau}$ are all $0$, this simplifies to one representation that converges fast for small reaction-time values ("small time expansion"):
\begin{equation*}
\text{Wiener}(y|\alpha, \tau, \beta, \delta) =
\frac{\alpha}{(y-\tau)^{3/2}} \exp \! \left(- \delta \alpha \beta -
\frac{\delta^2(y-\tau)}{2}\right) \sum_{k = - \infty}^{\infty} (2k +
\beta) \phi \! \left(\frac{(2k + \beta)\alpha }{\sqrt{y - \tau}}\right),
\end{equation*}
where $\phi(x)$ denotes the standard normal density function,
and one representation that converges fast for large reaction-time values ("large time expansion"):
\begin{equation*}
\text{Wiener}(y|\alpha, \tau, \beta, \delta) =
\frac{\pi}{\alpha^2} \exp \! \left(- \delta \alpha \beta -
\frac{\delta^2(y-\tau)}{2}\right) \sum_{k = 1}^{\infty} k \exp \! \left(-\frac{k^2\pi^2(y-\tau)};
{2\alpha^2}\right) \sin \!(k\pi\beta)
\end{equation*}
see [@Feller1968], [@NavarroFuss2009].
### Cumulative distribution function
For the cumulative distribution function (cdf) there also exist two expressions
depending on the reaction time.
Let $\alpha$, $\tau$, $\beta$, $\delta$, $s_{\delta}$, $s_{\beta}$, $s_{\tau}$
and $y$ be as above.
The formula for the large-time cdf of decision times (excluding the additive
reaction time components summarized in $\tau$ for the time being) at the upper
boundary is stated as follows:
\begin{equation}
F(y|\alpha, \beta, \delta) = P(\alpha, \beta, \delta) -
\exp\left(\delta\alpha(1-\beta)-\frac{\delta^2 y}{2}\right)F_l(y|\alpha,\beta,\delta),
\end{equation}
where $P(\alpha,\beta,\delta)$ is the probability to hit the upper boundary, defined as
\begin{equation}
P(\alpha, \beta, \delta) =
\begin{cases}
\frac{1-\exp(2\delta \alpha \beta)}{\exp(-2\delta \alpha(1-\beta)) - \exp(2\delta \alpha \beta)}, & \text{for } \delta\neq 0 \\
\beta, & \text{for } \delta=0,
\end{cases}
\end{equation}
and
\begin{equation}
F_l(y|\alpha, \beta, \delta) =
\frac{2\pi}{\alpha^2}\sum_{k=1}^{\infty}{\frac{k\sin{k\pi(1-\beta)}}{\delta^2+(k\pi)^2/\alpha^2}}\exp(-\frac{k^2\pi^2y}{2\alpha^2}).
\end{equation}
The formula for the small-time cdf at the upper boundary is stated as follows:
\begin{equation}
F(y|\alpha,\beta,\delta) = \exp\left(\delta \alpha(1-\beta) -\frac{\delta^2y}{2}\right)F_s(y|\alpha, \beta,\delta),
\end{equation} where
\begin{equation}
F_s(y|\alpha,\beta,\delta) = \sum_{k=0}^{\infty}(-1)^k\phi\left(\frac{\alpha(k+\beta^{*}_k)}
{\sqrt{y}} \right) \times \left( R \left(\frac{\alpha(k+\beta^{*}_k)+\delta y}{\sqrt{y}} \right)
+ R \left(\frac{\alpha(k+\beta^*_k)-\delta y}{\sqrt{y}} \right)\right),
\end{equation}
where $\beta^*_k=(1-\beta)$ for $k$ even, $\beta^*_k=\beta$ for $k$ odd, and $R$ is Mill's ratio.
The cdf for the lower boundary is $F(y|\alpha,1-\beta,-\delta)$
### Distribution statement
`y ~ ` **`wiener`**`(alpha, tau, beta, delta)`
Increment target log probability density with `wiener_lupdf(y | alpha, tau, beta, delta)`.
{{< since 2.7 >}}
`y ~ ` **`wiener`**`(alpha, tau, beta, delta, var_delta)`
Increment target log probability density with `wiener_lupdf(y | alpha, tau, beta, delta, var_delta)`.
{{< since 2.35 >}}
`y ~ ` **`wiener`**`(alpha, tau, beta, delta, var_delta, var_beta, var_tau)`
Increment target log probability density with `wiener_lupdf(y | alpha, tau, beta, delta, var_delta, var_beta, var_tau)`.
{{< since 2.35 >}}
<!-- real; wiener ~; -->
\index{{\tt \bfseries wiener }!sampling statement|hyperpage}
### Stan functions
<!-- real; wiener_lpdf; (reals y | reals alpha, reals tau, reals beta, reals delta); -->
\index{{\tt \bfseries wiener\_lpdf }!{\tt (reals y \textbar\ reals alpha, reals tau, reals beta, reals delta): real}|hyperpage}
`real` **`wiener_lpdf`**`(reals y | reals alpha, reals tau, reals beta, reals delta)`<br>\newline
The log of the Wiener first passage time density of `y` given boundary
separation `alpha`, non-decision time `tau`, starting point `beta`, and drift
rate `delta`.
{{< since 2.18 >}}
<!-- real; wiener_lpdf; (real y | real alpha, real tau, real beta, real delta, real var_delta); -->
\index{{\tt \bfseries wiener\_lpdf }!{\tt (real y \textbar\ real alpha, real tau, real beta, real delta, real var\_delta): real}|hyperpage}
`real` **`wiener_lpdf`**`(real y | real alpha, real tau, real beta, real delta, real var_delta)`<br>\newline
The log of the Wiener first passage time density of `y` given boundary
separation `alpha`, non-decision time `tau`, starting point `beta`, drift
rate `delta`, and inter-trial drift rate variability `var_delta`.
Setting `var_delta` to `0` recovers the 4-parameter signature above.
{{< since 2.35 >}}
<!-- real; wiener_lpdf; (real y | real alpha, real tau, real beta, real delta, real var_delta, real var_beta, real var_tau); -->
\index{{\tt \bfseries wiener\_lpdf }!{\tt (real y \textbar\ real alpha, real tau, real beta, real delta, real var\_delta, real var\_beta, real var\_tau): real}|hyperpage}
`real` **`wiener_lpdf`**`(real y | real alpha, real tau, real beta, real delta, real var_delta, real var_beta, real var_tau)`<br>\newline
The log of the Wiener first passage time density of `y` given boundary
separation `alpha`, non-decision time `tau`, starting point `beta`, drift
rate `delta`, inter-trial drift rate variability `var_delta`, inter-trial
variability of the starting point (bias) `var_beta`, and inter-trial variability
of the non-decision time `var_tau`.
Setting `var_delta`, `var_beta`, and `var_tau` to `0` recovers the 4-parameter signature above.
{{< since 2.35 >}}
<!-- real; wiener_lupdf; (reals y | reals alpha, reals tau, reals beta, reals delta); -->
\index{{\tt \bfseries wiener\_lupdf }!{\tt (reals y \textbar\ reals alpha, reals tau, reals beta, reals delta): real}|hyperpage}
`real` **`wiener_lupdf`**`(reals y | reals alpha, reals tau, reals beta, reals delta)`<br>\newline
The log of the Wiener first passage time density of `y` given boundary
separation `alpha`, non-decision time `tau`, starting point `beta`, and drift
rate `delta`, dropping constant additive terms
{{< since 2.25 >}}
<!-- real; wiener_lupdf; (real y | real alpha, real tau, real beta, real delta, real var_delta); -->
\index{{\tt \bfseries wiener\_lupdf }!{\tt (real y \textbar\ real alpha, real tau, real beta, real delta, real var\_delta): real}|hyperpage}
`real` **`wiener_lupdf`**`(real y | real alpha, real tau, real beta, real delta, real var_delta)`<br>\newline
The log of the Wiener first passage time density of `y` given boundary
separation `alpha`, non-decision time `tau`, starting point `beta`, drift
rate `delta`, and inter-trial drift rate variability `var_delta`,
dropping constant additive terms.
Setting `var_delta` to `0` recovers the 4-parameter signature above.
{{< since 2.35 >}}
<!-- real; wiener_lupdf; (real y | real alpha, real tau, real beta, real delta, real var_delta, real var_beta, real var_tau); -->
\index{{\tt \bfseries wiener\_lupdf }!{\tt (real y \textbar\ real alpha, real tau, real beta, real delta, real var\_delta, real var\_beta, real var\_tau): real}|hyperpage}
`real` **`wiener_lupdf`**`(real y | real alpha, real tau, real beta, real delta, real var_delta, real var_beta, real var_tau)`<br>\newline
The log of the Wiener first passage time density of `y` given boundary
separation `alpha`, non-decision time `tau`, starting point `beta`, drift
rate `delta`, inter-trial drift rate variability `var_delta`, inter-trial
variability of the starting point (bias) `var_beta`, and inter-trial variability
of the non-decision time `var_tau`, dropping constant additive terms.
Setting `var_delta`, `var_beta`, and `var_tau` to `0` recovers the 4-parameter signature above.
{{< since 2.35 >}}
---
**Note:** The `lcdf` and `lccdf` functions for the `wiener` distribution are
conditional and unnormalized, meaning that the cdf does not asymptote at 1,
but rather at the probability to hit the upper [boundary](#boundaries).
Similarly, the ccdf is defined as the probability to hit the upper boundary less
the value of the cdf, as opposed to the more typical $1 - \textrm{cdf}$.
<!-- real; wiener_lcdf_unnorm; (real y, real alpha, real tau, real beta, real delta); -->
\index{{\tt \bfseries wiener\_lcdf\_unnorm }!{\tt (real y, real alpha, real tau, real beta, real delta): real}|hyperpage}
`real` **`wiener_lcdf_unnorm`**`(real y, real alpha, real tau, real beta, real delta)`<br>\newline
The log of the cumulative distribution function (cdf) of the Wiener distribution
of `y` given boundary separation `alpha`, non-decision time `tau`, starting point
`beta`, and drift rate `delta`.
{{< since 2.38 >}}
<!-- real; wiener_lccdf_unnorm; (real y, real alpha, real tau, real beta, real delta); -->
\index{{\tt \bfseries wiener\_lccdf\_unnorm }!{\tt (real y, real alpha, real tau, real beta, real delta): real}|hyperpage}
`real` **`wiener_lccdf_unnorm`**`(real y, real alpha, real tau, real beta, real delta)`<br>\newline
The log of the complementary cumulative distribution function (ccdf) of the
Wiener distribution of `y` given boundary separation `alpha`, non-decision time
`tau`, starting point `beta`, and drift rate `delta`.
{{< since 2.38 >}}
<!-- real; wiener_lcdf_unnorm; (real y, real alpha, real tau, real beta, real delta, real var_delta, real var_beta, real var_tau); -->
\index{{\tt \bfseries wiener\_lcdf\_unnorm }!{\tt (real y, real alpha, real tau, real beta, real delta, real var\_delta, real var\_beta, real var\_tau): real}|hyperpage}
`real` **`wiener_lcdf_unnorm`**`(real y, real alpha, real tau, real beta, real delta, real var_delta, real var_beta, real var_tau)`<br>\newline
The log of the cumulative distribution function (cdf) of the Wiener distribution
of `y` given boundary separation `alpha`, non-decision time `tau`, starting point
`beta`, drift rate `delta`, inter-trial drift rate variability `var_delta`,
inter-trial variability of the starting point (bias) `var_beta`, and inter-trial
variability of the non-decision time `var_tau`.
{{< since 2.38 >}}
<!-- real; wiener_lccdf_unnorm; (real y, real alpha, real tau, real beta, real delta, real var_delta, real var_beta, real var_tau); -->
\index{{\tt \bfseries wiener\_lccdf\_unnorm }!{\tt (real y, real alpha, real tau, real beta, real delta, real var\_delta, real var\_beta, real var\_tau): real}|hyperpage}
`real` **`wiener_lccdf_unnorm`**`(real y, real alpha, real tau, real beta, real delta, real var_delta, real var_beta, real var_tau)`<br>\newline
The log of the complementary cumulative distribution function (ccdf) of the
Wiener distribution of `y` given boundary separation `alpha`, non-decision time
`tau`, starting point `beta`, drift rate `delta`, inter-trial drift rate
variability `var_delta`, inter-trial variability of the starting point (bias)
`var_beta`, and inter-trial variability of the non-decision time `var_tau`.
{{< since 2.38 >}}
### Boundaries
Stan returns the first passage time of the accumulation process over
the upper boundary only. To get the result for the lower boundary, use
\begin{equation*}
\text{Wiener}(y | \alpha, \tau, 1 - \beta, - \delta)
\end{equation*}
For more details, see the appendix of @Vandekerckhove-Wabersich:2014.
### Vectorization
The 5- and 7-argument forms of the `wiener` distribution functions (listed above
as recieving only `real`) are implemented in such a way where they can be
fully [vectorized](conventions_for_probability_functions.qmd#prng-vectorization),
but currently only versions that accept all `real` and all `vector` arguments
are exposed by Stan. If there are additional signatures that would prove useful,
please request them by [opening an issue](https://github.com/stan-dev/stanc3/issues/new).
### Tolerance tuning
The 5- and 7-argument forms of the `wiener` distribution functions can also
accept an additional `data real` argument controlling the required precision of
the gradient calculation of the function. If omitted, this defaults to `1e-4`
for the density and `1e-8` for the cdf functions.