Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docs for the skew double exponential #336

Merged
merged 1 commit into from Mar 4, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
65 changes: 65 additions & 0 deletions src/functions-reference/unbounded_continuous_distributions.Rmd
Expand Up @@ -14,6 +14,7 @@ cat(' * <a href="cauchy-distribution.html">Cauchy Distribution</a>\n')
cat(' * <a href="double-exponential-laplace-distribution.html">Double Exponential (Laplace) Distribution</a>\n')
cat(' * <a href="logistic-distribution.html">Logistic Distribution</a>\n')
cat(' * <a href="gumbel-distribution.html">Gumbel Distribution</a>\n')
cat(' * <a href="skew-double-exponential-distribution.html">Skew Double Exponential Distribution</a>\n')
}
```

Expand Down Expand Up @@ -730,3 +731,67 @@ Generate a gumbel variate with location mu and scale beta; may only be
used in transformed data and generated quantities blocks. For a description
of argument and return types, see section
[vectorized PRNG functions](#prng-vectorization).

## Skew double exponential distribution

### Probability density function

If $\mu \in \mathbb{R}$, $\sigma \in \mathbb{R}^+$ and $\tau \in [0, 1]$,
then for $y \in \mathbb{R}$,
$$\begin{aligned}
& \text{SkewDoubleExponential} (y|\mu,\sigma, \tau) = \\
& \qquad \qquad \frac{2 \tau (1 - \tau) }{\sigma} \exp \left[ - \frac{2}{\sigma} \left[ \left(1 - \tau \right) I(y < \mu) (\mu - y) + \tau I(y > \mu)(y-\mu) \right] \right]
\end{aligned}$$


### Sampling statement

`y ~ ` **`skew_double_exponential`**`(mu, sigma, tau)`

Increment target log probability density with `skew_double_exponential(y | mu, sigma, tau)`
<!-- real; skew_double_exponential ~; -->
\index{{\tt \bfseries skew\_double\_exponential }!sampling statement|hyperpage}

### Stan functions

<!-- real; skew_double_exponential_lpdf; (reals y | reals mu, reals sigma, reals tau); -->
\index{{\tt \bfseries skew\_double\_exponential\_lpdf }!{\tt (reals y \textbar\ reals mu, reals sigma, reals tau): real}|hyperpage}

`real` **`skew_double_exponential_lpdf`**`(reals y | reals mu, reals sigma, reals tau)`<br>\newline
The log of the skew double exponential density of y given location mu, scale sigma and skewness tau

<!-- real; skew_double_exponential_lupdf; (reals y | reals mu, reals sigma, reals tau); -->
\index{{\tt \bfseries skew\_double\_exponential\_lupdf }!{\tt (reals y \textbar\ reals mu, reals sigma, reals tau): real}|hyperpage}

`real` **`skew_double_exponential_lupdf`**`(reals y | reals mu, reals sigma, reals tau)`<br>\newline
The log of the skew double exponential density of y given location mu, scale sigma and skewness tau dropping constant additive terms

<!-- real; skew_double_exponential_cdf; (reals y, reals mu, reals sigma, reals tau); -->
\index{{\tt \bfseries skew\_double\_exponential\_cdf }!{\tt (reals y, reals mu, reals sigma, reals tau): real}|hyperpage}

`real` **`skew_double_exponential_cdf`**`(reals y, reals mu, reals sigma, reals tau)`<br>\newline
The skew double exponential cumulative distribution function of y given
location mu, scale sigma and skewness tau

<!-- real; skew_double_exponential_lcdf; (reals y | reals mu, reals sigma, reals tau); -->
\index{{\tt \bfseries skew\_double\_exponential\_lcdf }!{\tt (reals y \textbar\ reals mu, reals sigma, reals tau): real}|hyperpage}

`real` **`skew_double_exponential_lcdf`**`(reals y | reals mu, reals sigma, reals tau)`<br>\newline
The log of the skew double exponential cumulative distribution function of
y given location mu, scale sigma and skewness tau

<!-- real; skew_double_exponential_lccdf; (reals y | reals mu, reals sigma, reals tau); -->
\index{{\tt \bfseries skew\_double\_exponential\_lccdf }!{\tt (reals y \textbar\ reals mu, reals sigma, reals tau): real}|hyperpage}

`real` **`skew_double_exponential_lccdf`**`(reals y | reals mu, reals sigma, reals tau)`<br>\newline
The log of the skew double exponential complementary cumulative
distribution function of y given location mu, scale sigma and skewness tau

<!-- R; skew_double_exponential_rng; (reals mu, reals sigma); -->
\index{{\tt \bfseries skew\_double\_exponential\_rng }!{\tt (reals mu, reals sigma, reals tau): R}|hyperpage}

`R` **`skew_double_exponential_rng`**`(reals mu, reals sigma, reals tau)`<br>\newline
Generate a skew double exponential variate with location mu, scale
sigma and skewness tau; may only be used in transformed data and generated quantities blocks. For a
description of argument and return types, see section
[vectorized PRNG functions](#prng-vectorization).