Description Usage Arguments Details Value References See Also Examples
These functions provide the density, distribution function, quantile
function, and random generation for the univariate, asymmetric Laplace
distribution with location parameter location
, scale parameter
scale
, and asymmetry or skewness parameter kappa
.
1 2 3 4 
x, q 
These are each a vector of quantiles. 
p 
This is a vector of probabilities. 
n 
This is the number of observations, which must be a positive integer that has length 1. 
location 
This is the location parameter mu. 
scale 
This is the scale parameter lambda, which must be positive. 
kappa 
This is the asymmetry or skewness parameter kappa, which must be positive. 
log 
Logical. If 
Application: Continuous Univariate
Density: ((kappa*sqrt(2)) / (lambda*(1+kappa^2))) * exp(xmu * (sqrt(2)/lambda) * kappa^(xmu) * xmu)
Inventor: Kotz, Kozubowski, and Podgorski (2001)
Notation 1: theta ~ AL(mu, lambda, kappa)
Notation 2: p(theta) = AL(theta  mu, lambda, kappa)
Parameter 1: location parameter mu
Parameter 2: scale parameter lambda > 0
Parameter 3: skewness parameter kappa > 0
Mean: E(theta) = mu + lambda*(1/kappa  kappa) / sqrt(2)
Variance: var(theta) = lambda^2 * (1 + kappa^4) / (2*kappa^2)
Mode: mode(theta) = mu
The asymmetric Laplace of Kotz, Kozubowski, and Podgorski (2001), also referred to as AL, is an extension of the univariate, symmetric Laplace distribution to allow for skewness. It is parameterized according to three parameters: location parameter mu, scale parameter lambda, and asymmetry or skewness parameter kappa. The special case of kappa=1 is the symmetric Laplace distribution. Values of kappa in the intervals (0,1) and (1, Inf), correspond to positive (right) and negative (left) skewness, respectively. The AL distribution is leptokurtic, and its kurtosis ranges from 3 to 6 as kappa ranges from 1 to infinity. The skewness of the AL has been useful in engineering and finance. As an example, the AL distribution has been used as a replacement for Gaussiandistributed GARCH residuals. There is also an extension to the asymmetric multivariate Laplace distribution.
The asymmetric Laplace distribution is demonstrated in Kozubowski and Podgorski (2001) to be wellsuited for financial modeling, specifically with currency exchange rates.
These functions are similar to those in the VGAM
package.
dalaplace
gives the density,
palaplace
gives the distribution function,
qalaplace
gives the quantile function, and
ralaplace
generates random deviates.
Kotz, S., Kozubowski, T.J., and Podgorski, K. (2001). "The Laplace Distribution and Generalizations: a Revisit with Applications to Communications, Economics, Engineering, and Finance". Boston: Birkhauser.
Kozubowski, T.J. and Podgorski, K. (2001). "Asymmetric Laplace Laws and Modeling Financial Data". Mathematical and Computer Modelling, 34, p. 10031021.
dlaplace
and
dallaplace
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16  library(LaplacesDemon)
x < dalaplace(1,0,1,1)
x < palaplace(1,0,1,1)
x < qalaplace(0.5,0,1,1)
x < ralaplace(100,0,1,1)
#Plot Probability Functions
x < seq(from=5, to=5, by=0.1)
plot(x, dalaplace(x,0,1,0.5), ylim=c(0,1), type="l", main="Probability Function",
ylab="density", col="red")
lines(x, dalaplace(x,0,1,1), type="l", col="green")
lines(x, dalaplace(x,0,1,5), type="l", col="blue")
legend(1, 0.9, expression(paste(mu==0, ", ", lambda==1, ", ", kappa==0.5),
paste(mu==0, ", ", lambda==1, ", ", kappa==1),
paste(mu==0, ", ", lambda==1, ", ", kappa==5)),
lty=c(1,1,1), col=c("red","green","blue"))

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
Please suggest features or report bugs in the GitHub issue tracker.
All documentation is copyright its authors; we didn't write any of that.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.