17.1 Lognormal Distribution
17.1.1 Probability Density Function
If \(\mu \in \mathbb{R}\) and \(\sigma \in \mathbb{R}^+\), then for \(y \in \mathbb{R}^+\), \[ \text{LogNormal}(y|\mu,\sigma) = \frac{1}{\sqrt{2 \pi} \ \sigma} \, \frac{1}{y} \ \exp \! \left( - \, \frac{1}{2} \, \left( \frac{\log y - \mu}{\sigma} \right)^2 \right) . \]
17.1.2 Sampling Statement
y ~
lognormal
(mu, sigma)
Increment target log probability density with lognormal_lupdf(y | mu, sigma)
.
17.1.3 Stan Functions
real
lognormal_lpdf
(reals y | reals mu, reals sigma)
The log of the lognormal density of y given location mu and scale
sigma
real
lognormal_lupdf
(reals y | reals mu, reals sigma)
The log of the lognormal density of y given location mu and scale
sigma dropping constant additive terms
real
lognormal_cdf
(reals y, reals mu, reals sigma)
The cumulative lognormal distribution function of y given location mu
and scale sigma
real
lognormal_lcdf
(reals y | reals mu, reals sigma)
The log of the lognormal cumulative distribution function of y given
location mu and scale sigma
real
lognormal_lccdf
(reals y | reals mu, reals sigma)
The log of the lognormal complementary cumulative distribution
function of y given location mu and scale sigma
R
lognormal_rng
(reals mu, reals sigma)
Generate a lognormal variate with location mu and scale sigma; may
only be used in transformed data and generated quantities blocks.
For a description of argument and return types, see section
vectorized PRNG functions.