Skip to content

Commit 5676891

Browse files
committed
Move content of the non-negative distributions chapter to other chapters
1 parent 8aa78a1 commit 5676891

File tree

4 files changed

+91
-104
lines changed

4 files changed

+91
-104
lines changed

src/functions-reference/_bookdown.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ rmd_files: [
2222
"continuous_distributions.Rmd",
2323
"unbounded_continuous_distributions.Rmd",
2424
"positive_continuous_distributions.Rmd",
25-
"non-negative_continuous_distributions.Rmd",
2625
"positive_lower-bounded_distributions.Rmd",
2726
"continuous_distributions_on_[0_1].Rmd",
2827
"circular_distributions.Rmd",

src/functions-reference/non-negative_continuous_distributions.Rmd

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

src/functions-reference/positive_continuous_distributions.Rmd

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ cat(' * <a href="gamma-distribution.html">Gamma Distribution</a>\n')
1414
cat(' * <a href="inverse-gamma-distribution.html">Inverse Gamma Distribution</a>\n')
1515
cat(' * <a href="weibull-distribution.html">Weibull Distribution</a>\n')
1616
cat(' * <a href="frechet-distribution.html">Frechet Distribution</a>\n')
17+
cat(' * <a href="rayleigh-distribution.html">Rayleigh Distribution</a>\n')
1718
}
1819
```
1920

@@ -532,3 +533,54 @@ be used in transformed data and generated quantities blocks.
532533
For a description of argument and return types, see section
533534
[vectorized PRNG functions](#prng-vectorization).
534535

536+
## Rayleigh Distribution
537+
538+
### Probability Density Function
539+
540+
If $\sigma \in \mathbb{R}^+$, then for $y \in [0,\infty)$, \[
541+
\text{Rayleigh}(y|\sigma) = \frac{y}{\sigma^2} \exp(-y^2 / 2\sigma^2)
542+
\!. \]
543+
544+
### Sampling Statement
545+
546+
`y ~ ` **`rayleigh`**`(sigma)`
547+
548+
Increment target log probability density with `rayleigh_lpdf(y | sigma)`
549+
dropping constant additive terms.
550+
<!-- real; rayleigh ~; -->
551+
\index{{\tt \bfseries rayleigh }!sampling statement|hyperpage}
552+
553+
### Stan Functions
554+
555+
<!-- real; rayleigh_lpdf; (reals y | reals sigma); -->
556+
\index{{\tt \bfseries rayleigh\_lpdf }!{\tt (reals y \textbar\ reals sigma): real}|hyperpage}
557+
558+
`real` **`rayleigh_lpdf`**`(reals y | reals sigma)`<br>\newline
559+
The log of the Rayleigh density of y given scale sigma
560+
561+
<!-- real; rayleigh_cdf; (real y, real sigma); -->
562+
\index{{\tt \bfseries rayleigh\_cdf }!{\tt (real y, real sigma): real}|hyperpage}
563+
564+
`real` **`rayleigh_cdf`**`(real y, real sigma)`<br>\newline
565+
The Rayleigh cumulative distribution of y given scale sigma
566+
567+
<!-- real; rayleigh_lcdf; (real y | real sigma); -->
568+
\index{{\tt \bfseries rayleigh\_lcdf }!{\tt (real y \textbar\ real sigma): real}|hyperpage}
569+
570+
`real` **`rayleigh_lcdf`**`(real y | real sigma)`<br>\newline
571+
The log of the Rayleigh cumulative distribution of y given scale sigma
572+
573+
<!-- real; rayleigh_lccdf; (real y | real sigma); -->
574+
\index{{\tt \bfseries rayleigh\_lccdf }!{\tt (real y \textbar\ real sigma): real}|hyperpage}
575+
576+
`real` **`rayleigh_lccdf`**`(real y | real sigma)`<br>\newline
577+
The log of the Rayleigh complementary cumulative distribution of y
578+
given scale sigma
579+
580+
<!-- R; rayleigh_rng; (reals sigma); -->
581+
\index{{\tt \bfseries rayleigh\_rng }!{\tt (reals sigma): R}|hyperpage}
582+
583+
`R` **`rayleigh_rng`**`(reals sigma)`<br>\newline
584+
Generate a Rayleigh variate with scale sigma; may only be used in
585+
generated quantities block. For a description of argument and return
586+
types, see section [vectorized PRNG functions](#prng-vectorization).

src/functions-reference/positive_lower-bounded_distributions.Rmd

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ above some positive minimum value.
77
if (knitr::is_html_output()) {
88
cat(' * <a href="pareto-distribution.html">Pareto Distribution</a>\n')
99
cat(' * <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
128129
For 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

Comments
 (0)