The Exponential distribution has the probability density function (PDF):
\(f(x | \lambda) = \lambda \exp(-\lambda x), \quad x \geq 0,\)
where:
- \(\lambda\)
is the rate parameter (\(\lambda > 0\)), which determines the rate of decay of the distribution.
The Exponential distribution is commonly used to model the time between independent events that occur at a constant average rate.
These two functions are for sampling using the STORS algorithm based on the proposal that has been constructed using srexp_optimize.
By default, srexp() samples from a standard Exponential Distribution rate = 1.
The proposal distribution is pre-optimized at package load time using srexp_optimize() with
steps = 4091, creating a scalable proposal centred around the mode.
If srexp() is called with custom rate parameter, the samples are generated
from the standard Exponential Distribution, then scaled accordingly.