Draw Random Numbers from Approximated (Differentiably) Uniform Distribution.
rapprox_unif(n = 100, scale, tildec = 13.86294, seed = 123)
number of draws.
the scale parameter originally defining the upper bound of the uniform distribution.
denotes the ratio between scale parameter \(\theta\) and \(s\). The latter is responsible for the closeness of the approximation to the uniform distribution. See also below for further details and the default value.
denotes the seed
n draws with density papprox_unif
.
The method is based on the inversion method and the quantile function is computed numerically using uniroot
.
Nadja Klein and Thomas Kneib (2015). Scale-Dependent Priors for Variance Parameters in Structured Additive Distributional Regression. Working Paper.