
Density, distribution function, quantile function and random generation
for the 3-parameter log-Laplace distribution with location
parameter location.ald
, scale parameter scale.ald
(on the log scale),
and asymmetry parameter kappa
.
dloglap(x, location.ald = 0, scale.ald = 1,
tau = 0.5, kappa = sqrt(tau/(1-tau)), log = FALSE)
ploglap(q, location.ald = 0, scale.ald = 1, tau = 0.5,
kappa = sqrt(tau/(1-tau)), lower.tail = TRUE, log.p = FALSE)
qloglap(p, location.ald = 0, scale.ald = 1, tau = 0.5,
kappa = sqrt(tau/(1-tau)), lower.tail = TRUE, log.p = FALSE)
rloglap(n, location.ald = 0, scale.ald = 1,
tau = 0.5, kappa = sqrt(tau/(1-tau)))
vector of quantiles.
vector of probabilities.
number of observations.
If length(n) > 1
then the length is taken to be the number required.
the location parameter
the quantile parameter kappa
and is ignored
if kappa
is assigned.
the asymmetry parameter
if TRUE
, probabilities p
are given as log(p)
.
dloglap
gives the density,
ploglap
gives the distribution function,
qloglap
gives the quantile function, and
rloglap
generates random deviates.
A positive random variable alaplace3
.
Kozubowski, T. J. and Podgorski, K. (2003). Log-Laplace distributions. International Mathematical Journal, 3, 467--495.
# NOT RUN {
loc <- 0; sigma <- exp(0.5); kappa <- 1
x <- seq(-0.2, 5, by = 0.01)
# }
# NOT RUN {
plot(x, dloglap(x, loc, sigma, kappa = kappa),
type = "l", col = "blue", ylim = c(0,1),
main = "Blue is density, red is cumulative distribution function",
sub = "Purple are 5,10,...,95 percentiles", las = 1, ylab = "")
abline(h = 0, col = "blue", lty = 2)
lines(qloglap(seq(0.05,0.95,by = 0.05), loc, sigma, kappa = kappa),
dloglap(qloglap(seq(0.05,0.95,by = 0.05), loc, sigma, kappa = kappa),
loc, sigma, kappa = kappa),
col = "purple", lty = 3, type = "h")
lines(x, ploglap(x, loc, sigma, kappa = kappa), type = "l", col = "red")
abline(h = 0, lty = 2)
# }
# NOT RUN {
ploglap(qloglap(seq(0.05,0.95,by = 0.05), loc, sigma, kappa = kappa),
loc, sigma, kappa = kappa)
# }
Run the code above in your browser using DataLab