The Gamma Distribution
The Gamma distribution has the probability density function (PDF):
$$f(x | \alpha, \beta) = \frac{\beta^\alpha}{\Gamma(\alpha)} x^{\alpha - 1} \exp(-\beta x), \quad x \geq 0,$$
where:
- \(\alpha\)
is the shape parameter (\(\alpha > 0\)), which determines the shape of the distribution.
- \(\beta\)
is the rate parameter (\(\beta > 0\)), which determines the rate of decay.
The Gamma distribution is widely used in statistics, particularly in Bayesian inference and modelling waiting times.
This function samples from a proposal constructed using srgamma_optimize, employing the STORS algorithm.
By default, srgamma_custom() samples from the standard Gamma distribution with shape = 1 and rate = 1.
The proposal distribution is pre-optimized at package load time using srgamma_optimize() with
steps = 4091, creating a scalable proposal centred around the mode.