rald: The asymmetric Laplace distribution

raldR Documentation

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)

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 ; μ, σ) = \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 (-∞, ∞).

Value

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

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.


bsamGP documentation built on March 18, 2022, 7:35 p.m.