| aldmix {qbld} | R Documentation |
Asymmetric Laplace distribution
Description
Cumulative density, probability distribution function, quantile
function and random generation for the asymmetric Laplace distribution with
quantile p, location parameter mu and scale parameter sigma.
Usage
raldmix(n, mu, sigma, p)
daldmix(x, mu = 0, sigma = 1, p = 0.5)
paldmix(q, mu = 0, sigma = 1, p = 0.5, lower.tail = TRUE)
qaldmix(prob, mu = 0, sigma = 1, p = 0.5, lower.tail = TRUE)
Arguments
n |
: number of observations |
mu |
: location parameter |
sigma |
: scale parameter |
p, prob |
: probability at which to calculate quantile |
x, q |
: vector of quantiles |
lower.tail |
: logical; decides b/w |
Details
The asymmetric Laplace distribution (ALD), which has the following pdf:
f(x;\mu,\sigma,p) = \frac{p(1-p)}{\sigma} \exp\{-\frac{(x-\mu)}{\sigma}(p-I(x \le \mu))\}
If not specified, p=0.5, mu = 0, sigma = 1.
Value
-
raldmixreturns a vector of random numbers fromAL(mu,sigma,p). -
daldmixreturns returns density ofAL(mu,sigma,p)at point x. -
paldmixreturns CDF prob ofAL(mu,sigma,p)at quantile q. -
qaldmixreturns inverse CDF quantile ofAL(mu,sigma,p)at prob.
References
Keming Yu & Jin Zhang (2005) A Three-Parameter Asymmetric Laplace Distribution and Its Extension, Communications in Statistics - Theory and Methods, 34:9-10, 1867-1879, DOI: 10.1080/03610920500199018
Kobayashi, Genya. (2011). Gibbs Sampling Methods for Bayesian Quantile Regression. J Stat Comput Simul. 81. 1565. 10.1080/00949655.2010.496117.
See Also
rgig for random sampling from GIG distribution
Examples
raldmix(n = 10, mu = 5, sigma = 10, p = 0.5)
daldmix(c(4,5),mu = 0,sigma = 1,p = 0.5)
paldmix(c(1,4),mu = 0,sigma = 1,p = 0.5,lower.tail=TRUE)
qaldmix(0.5,mu = 0,sigma = 1,p = 0.5,lower.tail=TRUE)