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 ; \mu, \sigma) = \frac{p(1-p)}{\sigma}\exp\Big(-\frac{(x-\mu)[p-I(x\le\mu)]}{\sigma}\Big),
where 0 < p < 1
is the skew parameter, \sigma > 0
is the scale parameter, -\infty < \mu < \infty
is the location parameter, and I(\cdot)
is the indication function. The range of x
is (-\infty, \infty)
.
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.