The Laplace distribution has the probability density function (PDF):
\(f(x | \mu, b) = \frac{1}{2b} \exp\left(-\frac{|x - \mu|}{b}\right),\)
where:
- \(\mu\)
is the location parameter (mean of the distribution).
b
is the scale parameter, which controls the spread of the distribution (b > 0).
These two functions are for sampling using the STORS algorithm based on the proposal that has been constructed using srlaplace_optimize.
By default, srlaplace() samples from a standard Laplace Distribution (mu = 0, b = 1).
The proposal distribution is pre-optimized at package load time using srlaplace_optimize() with
steps = 4091, creating a scalable proposal centred around the mode.
If srlaplace() is called with custom mu or b parameters, the samples are generated
from the standard Laplace Distribution, then scaled and location shifted accordingly.