@@ -7,6 +7,7 @@ above some positive minimum value.
77if (knitr::is_html_output()) {
88cat(' * <a href="pareto-distribution.html">Pareto Distribution</a>\n')
99cat(' * <a href="pareto-type-2-distribution.html">Pareto Type 2 Distribution</a>\n')
10+ cat(' * <a href="wiener-first-passage-time-distribution.html">Wiener First Passage Time Distribution</a>\n')
1011}
1112```
1213
@@ -128,3 +129,41 @@ shape alpha; may only be used in transformed data and generated quantities block
128129For a description of argument and return types, see section
129130[ vectorized PRNG functions] ( #prng-vectorization ) .
130131
132+ ## Wiener First Passage Time Distribution
133+
134+ ### Probability Density Function
135+
136+ If $\alpha \in \mathbb{R}^+$, $\tau \in \mathbb{R}^+$, $\beta \in [ 0,
137+ 1] $ and $\delta \in \mathbb{R}$, then for $y > \tau$, \[
138+ \text{Wiener}(y|\alpha, \tau, \beta, \delta) =
139+ \frac{\alpha^3}{(y-\tau)^{3/2}} \exp \! \left(- \delta \alpha \beta -
140+ \frac{\delta^2(y-\tau)}{2}\right) \sum_ {k = - \infty}^{\infty} (2k +
141+ \beta) \phi \! \left(\frac{2k \alpha + \beta}{\sqrt{y - \tau}}\right)
142+ \] where $\phi(x)$ denotes the standard normal density function; see
143+ [ @Feller1968 ] , [ @NavarroFuss2009 ] .
144+
145+ ### Sampling Statement
146+
147+ ` y ~ ` ** ` wiener ` ** ` (alpha, tau, beta, delta) `
148+
149+ Increment target log probability density with ` wiener_lpdf(y | alpha, tau, beta, delta) `
150+ dropping constant additive terms.
151+ <!-- real; wiener ~; -->
152+ \index{{\tt \bfseries wiener }!sampling statement|hyperpage}
153+
154+ ### Stan Functions
155+
156+ <!-- real; wiener_lpdf; (reals y | reals alpha, reals tau, reals beta, reals delta); -->
157+ \index{{\tt \bfseries wiener\_ lpdf }!{\tt (reals y \textbar\ reals alpha, reals tau, reals beta, reals delta): real}|hyperpage}
158+
159+ ` real ` ** ` wiener_lpdf ` ** ` (reals y | reals alpha, reals tau, reals beta, reals delta) ` <br >\newline
160+ The log of the Wiener first passage time density of y given boundary
161+ separation alpha, non-decision time tau, a-priori bias beta and drift
162+ rate delta
163+
164+ ### Boundaries
165+
166+ Stan returns the first passage time of the accumulation process over
167+ the upper boundary only. To get the result for the lower boundary, use
168+ \[ \text{wiener}(y | \alpha, \tau, 1 - \beta, - \delta) \] For more
169+ details, see the appendix of @Vandekerckhove-Wabersich :2014.
0 commit comments