rald {bsamGP} | R Documentation |
Density for and random values from a three-parameter asymmetric Laplace distribution.
rald(n, location=0, scale=1, p=0.5)
n |
Number of random values to be generated. |
location |
Location parameter. |
scale |
Scale parameter. |
p |
Skewness parameter. |
This generic function generates a random variable from an asymmetric Laplace distribution (ALD). The ALD has the following probability density function:
ALD_p(x ; μ, σ) = \frac{p(1-p)}{σ}\exp\Big(-\frac{(x-μ)[p-I(x≤μ)]}{σ}\Big),
where 0 < p < 1 is the skew parameter, σ > 0 is the scale parameter, -∞ < μ < ∞ is the location parameter, and I(\cdot) is the indication function. The range of x is (-∞, ∞).
rald
gives out a vector of random numbers generated by
the asymmetric Laplace distribution.
Koenker, R. and Machado, J. (1999). Goodness of fit and related inference processes for quantile regression. Journal of the American Statistical Association, 94(3), 1296-1309.
Yu, K. and Zhang, J. (2005). A Three-parameter asymmetric Laplace distribution and its extension. Communications in Statistics - Theory and Methods, 34, 1867-1879.