Package 'MittagLeffleR'

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

Help Index


Mittag-Leffler family of distributions

Description

A generalization of the exponential distribution. Contains

Details

Also see the package web page at https://strakaps.github.io/MittagLeffleR/reference/index.html

Author(s)

Maintainer: Peter Straka [email protected]

Authors:

Other contributors:

See Also

Useful links:


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)

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[Xx]P[X \le x] otherwise, P[X>x]P[X > x]

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;α,τ)=1Eα,1((q/τ)α)F(q; \alpha, \tau) = 1 - E_{\alpha,1} (-(q/\tau)^\alpha)

for q0q \ge 0, tail parameter 0<α10 < \alpha \le 1, and scale parameter τ>0\tau > 0. Its PDF is given by

f(x;α,τ)=xα1Eα,α[(x/τ)α]/τα.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<α<10 < \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:

0exp(sx)f(x;α,1)dx=Eα,1(s)\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;α,τ)=f(x/τ;α,1)/τ.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)

Mittag-Leffler Function.

Description

The generalized (two-parameter) Mittag-Leffer function is defined by the power series

Eα,β(z)=k=0zk/Γ(αk+β)E_{\alpha,\beta} (z) = \sum_{k=0}^\infty z^k / \Gamma(\alpha k + \beta)

for complex zz and complex α,β\alpha, \beta with Real(α)>0Real(\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 optim.

Value

The output of optim.

Examples

library(magrittr)
rml(n = 100, tail = 0.8, scale = 1000) %>% mlmle()