Title: | Mittag-Leffler Family of Distributions |
---|---|
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>. |
Authors: | Katharina Hees [aut], Peter Straka [aut, cre], Gurtek Gill [aut], Roberto Garrappa [ctb] |
Maintainer: | Peter Straka <[email protected]> |
License: | GPL (>= 2) |
Version: | 0.4.1 |
Built: | 2024-11-26 06:23:32 UTC |
Source: | https://github.com/strakaps/mittagleffler |
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
)
Also see the package web page at https://strakaps.github.io/MittagLeffleR/reference/index.html
Maintainer: Peter Straka [email protected]
Authors:
Katharina Hees [email protected]
Gurtek Gill
Other contributors:
Roberto Garrappa [email protected] [contributor]
Useful links:
Report bugs at https://github.com/strakaps/MittagLeffleR/issues
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).
logMomentEstimator(x, alpha = 0.05)
logMomentEstimator(x, alpha = 0.05)
x |
A vector of non-negative data. |
alpha |
Confidence intervals are calculated at level 1 - alpha. |
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).
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
logMomentEstimator(rml(n = 1000, scale = 0.03, tail = 0.84), alpha=0.95)
logMomentEstimator(rml(n = 1000, scale = 0.03, tail = 0.84), alpha=0.95)
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).
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)
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)
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. |
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
for , tail parameter
,
and scale parameter
.
Its PDF is given by
As approaches 1 from below, the Mittag-Leffler converges
(weakly) to the exponential
distribution. For
, 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:
It is light-tailed, i.e. all its moments are finite.
At scale , its density is
dml
returns the density,
pml
returns the distribution function,
qml
returns the quantile function, and
rml
generates random variables.
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
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)
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)
The generalized (two-parameter) Mittag-Leffer function is defined by the power series
for complex and complex
with
(only implemented for real valued parameters).
mlf(z, a, b = 1, g = 1)
mlf(z, a, b = 1, g = 1)
z |
The argument (real-valued) |
a , b , g
|
Parameters of the Mittag-Leffler distribution; see Garrappa |
mlf
returns the value of the Mittag-Leffler function.
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
mlf(2,0.7)
mlf(2,0.7)
Optimizes the bivariate loglikelihood of the Mittag-Leffler distribution
via optim
. Uses logMomentEstimator
for initial parameter values.
mlmle(data, ...)
mlmle(data, ...)
data |
Vector of class "numeric" |
... |
Additional parameters passed on to |
The output of optim
.
library(magrittr) rml(n = 100, tail = 0.8, scale = 1000) %>% mlmle()
library(magrittr) rml(n = 100, tail = 0.8, scale = 1000) %>% mlmle()