16.8 Weibull Distribution
16.8.1 Probability Density Function
If \(\alpha \in \mathbb{R}^+\) and \(\sigma \in \mathbb{R}^+\), then for \(y \in [0,\infty)\), \[ \text{Weibull}(y|\alpha,\sigma) = \frac{\alpha}{\sigma} \, \left( \frac{y}{\sigma} \right)^{\alpha - 1} \, \exp \! \left( \! - \left( \frac{y}{\sigma} \right)^{\alpha} \right) . \]
Note that if \(Y \propto \text{Weibull}(\alpha,\sigma)\), then \(Y^{-1} \propto \text{Frechet}(\alpha,\sigma^{-1})\).
16.8.2 Sampling Statement
y ~
weibull
(alpha, sigma)
Increment target log probability density with weibull_lpdf( y | alpha, sigma)
dropping constant additive terms.
16.8.3 Stan Functions
real
weibull_lpdf
(reals y | reals alpha, reals sigma)
The log of the Weibull density of y given shape alpha and scale sigma
real
weibull_cdf
(reals y, reals alpha, reals sigma)
The Weibull cumulative distribution function of y given shape alpha
and scale sigma
real
weibull_lcdf
(reals y | reals alpha, reals sigma)
The log of the Weibull cumulative distribution function of y given
shape alpha and scale sigma
real
weibull_lccdf
(reals y | reals alpha, reals sigma)
The log of the Weibull complementary cumulative distribution function
of y given shape alpha and scale sigma
R
weibull_rng
(reals alpha, reals sigma)
Generate a weibull variate with shape alpha and scale sigma; may only
be used in generated quantities block. For a description of argument
and return types, see section vectorized PRNG functions.