Density, cumulative distribution, quantile functions and random number generation for the Asymmetric Laplace distribution with the location parameter mu, scale and the asymmetry parameter alpha.
dalaplace(q, mu =0, scale =1, alpha =0.5, log =FALSE)palaplace(q, mu =0, scale =1, alpha =0.5)qalaplace(p, mu =0, scale =1, alpha =0.5)ralaplace(n =1, mu =0, scale =1, alpha =0.5)
Arguments
q: vector of quantiles.
mu: vector of location parameters (means).
scale: vector of scale parameters.
alpha: value of asymmetry parameter. Varies from 0 to 1.
log: if TRUE, then probabilities are returned in logarithms.
p: vector of probabilities.
n: number of observations. Should be a single number.
Returns
Depending on the function, various things are returned (usually either vector or scalar):
dalaplace returns the density function value for the provided parameters.
palaplace returns the value of the cumulative function for the provided parameters.
qalaplace returns quantiles of the distribution. Depending on what was provided in p, mu and scale, this can be either a vector or a matrix, or an array.
ralaplace returns a vector of random variables generated from the Laplace distribution. Depending on what was provided in mu and scale, this can be either a vector or a matrix or an array.
Details
When mu=0 and scale=1, the Laplace distribution becomes standardized. The distribution has the following density function:
Geraci Marco, Bottai Matteo (2007). Quantile regression for longitudinal data using the asymmetric Laplace distribution. Biostatistics (2007), 8, 1, pp. 140-154 tools:::Rd_expr_doi("10.1093/biostatistics/kxj039")
Yu, K., & Zhang, J. (2005). A three-parameter asymmetric laplace distribution and its extension. Communications in Statistics - Theory and Methods, 34, 1867-1879. tools:::Rd_expr_doi("10.1080/03610920500199018")