Type: | Package |
Title: | Mittag-Leffler Family of Distributions |
Version: | 0.4.1 |
Author: | Katharina Hees [aut], Peter Straka [aut, cre], Gurtek Gill [aut], Roberto Garrappa [ctb] |
Maintainer: | Peter Straka <straka.ps@gmail.com> |
Description: | Implements the Mittag-Leffler function, distribution, random variate generation, and estimation. Based on the Laplace-Inversion algorithm by Garrappa, R. (2015) <doi:10.1137/140971191>. |
URL: | https://strakaps.github.io/MittagLeffleR/ |
BugReports: | https://github.com/strakaps/MittagLeffleR/issues |
License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
Encoding: | UTF-8 |
RoxygenNote: | 7.1.1 |
Imports: | stats, stabledist |
Suggests: | knitr, rmarkdown, testthat, animation, magrittr |
VignetteBuilder: | knitr |
NeedsCompilation: | no |
Packaged: | 2021-09-05 10:40:46 UTC; strakaps |
Repository: | CRAN |
Date/Publication: | 2021-09-06 06:50:02 UTC |
Mittag-Leffler family of distributions
Description
A generalization of the exponential distribution. Contains
-
the Mittag-Leffler function
mlf
-
distributions (
dml
,pml
,qml
) and random variate generation (rml
) -
a log-moment estimator (
logMomentEstimator
), and maximum likelihood estimator (mlmle
)
Details
Also see the package web page at https://strakaps.github.io/MittagLeffleR/reference/index.html
Author(s)
Maintainer: Peter Straka straka.ps@gmail.com
Authors:
Katharina Hees heeskatharina@gmail.com
Gurtek Gill
Other contributors:
Roberto Garrappa roberto.garrappa@uniba.it [contributor]
See Also
Useful links:
Report bugs at https://github.com/strakaps/MittagLeffleR/issues
Distribution functions and random number generation.
Description
Probability density, cumulative distribution function, quantile function and random variate generation for the two types of Mittag-Leffler distribution. The Laplace inversion algorithm by Garrappa is used for the pdf and cdf (see https://www.mathworks.com/matlabcentral/fileexchange/48154-the-mittag-leffler-function).
Usage
dml(x, tail, scale = 1, log = FALSE, second.type = FALSE)
pml(q, tail, scale = 1, second.type = FALSE, lower.tail = TRUE, log.p = FALSE)
qml(p, tail, scale = 1, second.type = FALSE, lower.tail = TRUE, log.p = FALSE)
rml(n, tail, scale = 1, second.type = FALSE)
Arguments
x , q |
vector of quantiles. |
tail |
tail parameter. |
scale |
scale parameter. |
log , log.p |
logical; if TRUE, probabilities p are given as log(p). |
second.type |
logical; if FALSE (default), first type of Mittag-Leffler distribution is assumed. |
lower.tail |
logical; if TRUE, probabilities are |
p |
vector of probabilities. |
n |
number of random draws. |
Details
The Mittag-Leffler function mlf
defines two types of
probability distributions:
The first type of Mittag-Leffler distribution assumes the Mittag-Leffler function as its tail function, so that the CDF is given by
F(q; \alpha, \tau) = 1 - E_{\alpha,1} (-(q/\tau)^\alpha)
for q \ge 0
, tail parameter 0 < \alpha \le 1
,
and scale parameter \tau > 0
.
Its PDF is given by
f(x; \alpha, \tau) = x^{\alpha - 1}
E_{\alpha,\alpha} [-(x/\tau)^\alpha] / \tau^\alpha.
As \alpha
approaches 1 from below, the Mittag-Leffler converges
(weakly) to the exponential
distribution. For 0 < \alpha < 1
, it is (very) heavy-tailed, i.e.
has infinite mean.
The second type of Mittag-Leffler distribution is defined via the Laplace transform of its density f:
\int_0^\infty \exp(-sx) f(x; \alpha, 1) dx = E_{\alpha,1}(-s)
It is light-tailed, i.e. all its moments are finite.
At scale \tau
, its density is
f(x; \alpha, \tau) = f(x/\tau; \alpha, 1) / \tau.
Value
dml
returns the density,
pml
returns the distribution function,
qml
returns the quantile function, and
rml
generates random variables.
References
Haubold, H. J., Mathai, A. M., & Saxena, R. K. (2011). Mittag-Leffler Functions and Their Applications. Journal of Applied Mathematics, 2011, 1–51. doi: 10.1155/2011/298628
Mittag-Leffler distribution. (2017, May 3). In Wikipedia, The Free Encyclopedia. https://en.wikipedia.org/w/index.php?title=Mittag-Leffler_distribution&oldid=778429885
Examples
dml(1, 0.8)
dml(1, 0.6, second.type=TRUE)
pml(2, 0.7, 1.5)
qml(p = c(0.25, 0.5, 0.75), tail = 0.6, scale = 100)
rml(10, 0.7, 1)
Log-Moments Estimator for the Mittag-Leffler Distribution (Type 1).
Description
Tail and scale parameter of the Mittag-Leffler distribution are estimated by matching with the first two empirical log-moments (see Cahoy et al., doi: 10.1016/j.jspi.2010.04.016).
Usage
logMomentEstimator(x, alpha = 0.05)
Arguments
x |
A vector of non-negative data. |
alpha |
Confidence intervals are calculated at level 1 - alpha. |
Value
A named vector with entries (nu, delta, nuLo, nuHi, deltaLo, deltaHi) where nu is the tail parameter and delta the scale parameter of the Mittag-Leffler distribution, with confidence intervals (nuLo, nuHi) resp. (deltaLo, deltaHi).
References
Cahoy, D. O., Uchaikin, V. V., & Woyczynski Wojbor, W. A. (2010). Parameter estimation for fractional Poisson processes. Journal of Statistical Planning and Inference, 140(11), 3106–3120. doi: 10.1016/j.jspi.2010.04.016
Cahoy, D. O. (2013). Estimation of Mittag-Leffler Parameters. Communications in Statistics - Simulation and Computation, 42(2), 303–315. doi: 10.1080/03610918.2011.640094
Examples
logMomentEstimator(rml(n = 1000, scale = 0.03, tail = 0.84), alpha=0.95)
Mittag-Leffler Function.
Description
The generalized (two-parameter) Mittag-Leffer function is defined by the power series
E_{\alpha,\beta} (z) = \sum_{k=0}^\infty z^k / \Gamma(\alpha
k + \beta)
for complex z
and complex \alpha, \beta
with
Real(\alpha) > 0
(only implemented for real valued parameters).
Usage
mlf(z, a, b = 1, g = 1)
Arguments
z |
The argument (real-valued) |
a , b , g |
Parameters of the Mittag-Leffler distribution; see Garrappa |
Value
mlf
returns the value of the Mittag-Leffler function.
References
Garrappa, R. (2015). Numerical Evaluation of Two and Three Parameter Mittag-Leffler Functions. SIAM Journal on Numerical Analysis, 53(3), 1350–1369. doi: 10.1137/140971191
The Mittag-Leffler function. MathWorks File Exchange. https://au.mathworks.com/matlabcentral/fileexchange/48154-the-mittag-leffler-function
Examples
mlf(2,0.7)
Maximum Likelihood Estimation of the Mittag-Leffler distribution
Description
Optimizes the bivariate loglikelihood of the Mittag-Leffler distribution
via optim
. Uses logMomentEstimator
for initial parameter values.
Usage
mlmle(data, ...)
Arguments
data |
Vector of class "numeric" |
... |
Additional parameters passed on to |
Value
The output of optim
.
Examples
library(magrittr)
rml(n = 100, tail = 0.8, scale = 1000) %>% mlmle()