f(x) = (sqrt2/scale) kappa/(1 + kappa^2) exp(-sqrt2 kappa (x - loc)/scale) for x >= loc, exp(-sqrt2 (loc - x)/(scale kappa)) below.
Density, distribution function, quantile and draws by inversion of the
morie Philox uniforms (identical in the Python arm).
Usage
AsyLaplace(x = NULL, loc = 0, scale = 1, kappa = 1, p = NULL, n = 0, seed = 0)
Arguments
- x
Evaluation points.
- loc
Parameter.
- scale
Parameter.
- kappa
Parameter.
- p
Probabilities for the quantile function.
- n
Number of random draws.
- seed
Philox seed.
Value
list(pdf, logpdf, cdf, quantile, random).
References
Kotz, S., Kozubowski, T. J. & Podgorski, K. (2001). The Laplace Distribution and Generalizations. Birkhauser, ch. 3.
Examples
AsyLaplace(0.5)$cdf
#> [1] 0.7534657