Asymmetric Laplace Distribution {cubfits} | R Documentation |
The Asymmetric Laplace Distribution
Description
Density, probability, quantile, random number generation, and MLE functions
for the asymmetric Laplace distribution
with parameters either in
or the alternative
.
Usage
dasl(x, theta = 0, mu = 0, sigma = 1, log = FALSE)
dasla(x, theta = 0, kappa = 1, sigma = 1, log = FALSE)
pasl(q, theta = 0, mu = 0, sigma = 1, lower.tail = TRUE,
log.p = FALSE)
pasla(q, theta = 0, kappa = 1, sigma = 1, lower.tail = TRUE,
log.p = FALSE)
qasl(p, theta = 0, mu = 0, sigma = 1, lower.tail = TRUE,
log.p = FALSE)
qasla(p, theta = 0, kappa = 1, sigma = 1, lower.tail = TRUE,
log.p = FALSE)
rasl(n, theta = 0, mu = 0, sigma = 1)
rasla(n, theta = 0, kappa = 1, sigma = 1)
asl.optim(x)
Arguments
x , q |
vector of quantiles. |
p |
vector of probabilities. |
n |
number of observations. If |
theta |
center parameter. |
mu , kappa |
location parameters. |
sigma |
shape parameter. |
log , log.p |
logical; if |
lower.tail |
logical; if |
Details
The density of
is given as
if
, and
if
.
The parameter domains of ASL and ASL* are
,
,
, and
.
The relation of
and
are
or
.
Value
“dasl” and “dasla” give the densities, “pasl” and “pasla” give the distribution functions, “qasl” and “qasla” give the quantile functions, and “rasl” and “rasls” give the random numbers.
asl.optim
returns the MLE of data x
including
theta
, mu
, kappa
, and sigma
.
Author(s)
Wei-Chen Chen wccsnow@gmail.com.
References
Kotz S, Kozubowski TJ, Podgorski K. (2001) “The Laplace distribution and generalizations: a revisit with applications to communications, economics, engineering, and finance.” Boston: Birkhauser.
Examples
## Not run:
suppressMessages(library(cubfits, quietly = TRUE))
set.seed(1234)
dasl(-2:2)
dasla(-2:2)
pasl(-2:2)
pasla(-2:2)
qasl(seq(0, 1, length = 5))
qasla(seq(0, 1, length = 5))
dasl(-2:2, log = TRUE)
dasla(-2:2, log = TRUE)
pasl(-2:2, log.p = TRUE)
pasla(-2:2, log.p = TRUE)
qasl(log(seq(0, 1, length = 5)), log.p = TRUE)
qasla(log(seq(0, 1, length = 5)), log.p = TRUE)
set.seed(123)
rasl(5)
rasla(5)
asl.optim(rasl(5000))
## End(Not run)