18.8 Logistic distribution
18.8.1 Probability density function
If \(\mu \in \mathbb{R}\) and \(\sigma \in \mathbb{R}^+\), then for \(y \in \mathbb{R}\), \[ \text{Logistic}(y|\mu,\sigma) = \frac{1}{\sigma} \ \exp\!\left( - \, \frac{y - \mu}{\sigma} \right) \ \left(1 + \exp \!\left( - \, \frac{y - \mu}{\sigma} \right) \right)^{\!-2} \! . \]
18.8.2 Sampling statement
y ~
logistic
(mu, sigma)
Increment target log probability density with logistic_lupdf(y | mu, sigma)
.
Available since 2.0
18.8.3 Stan functions
real
logistic_lpdf
(reals y | reals mu, reals sigma)
The log of the logistic density of y given location mu and scale sigma
Available since 2.12
real
logistic_lupdf
(reals y | reals mu, reals sigma)
The log of the logistic density of y given location mu and scale sigma
dropping constant additive terms
Available since 2.25
real
logistic_cdf
(reals y, reals mu, reals sigma)
The logistic cumulative distribution function of y given location mu
and scale sigma
Available since 2.0
real
logistic_lcdf
(reals y | reals mu, reals sigma)
The log of the logistic cumulative distribution function of y given
location mu and scale sigma
Available since 2.12
real
logistic_lccdf
(reals y | reals mu, reals sigma)
The log of the logistic complementary cumulative distribution function
of y given location mu and scale sigma
Available since 2.12
R
logistic_rng
(reals mu, reals sigma)
Generate a logistic 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.
Available since 2.18