Learn R Programming

bsamGP (version 1.2.6)

rald: The asymmetric Laplace distribution

Description

Density for and random values from a three-parameter asymmetric Laplace distribution.

Usage

rald(n, location=0, scale=1, p=0.5)

Value

rald gives out a vector of random numbers generated by the asymmetric Laplace distribution.

Arguments

n

Number of random values to be generated.

location

Location parameter.

scale

Scale parameter.

p

Skewness parameter.

Details

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)\).

References

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.