Learn R Programming

zipfextR (version 1.0.2)

moezipf: The Marshal-Olkin Extended Zipf Distribution (MOEZipf).

Description

Probability mass function, cumulative distribution function, quantile function and random number generation for the MOEZipf distribution with parameters \(\alpha\) and \(\beta\). The support of the MOEZipf distribution are the strictly positive integer numbers large or equal than one.

Usage

dmoezipf(x, alpha, beta, log = FALSE)

pmoezipf(q, alpha, beta, log.p = FALSE, lower.tail = TRUE)

qmoezipf(p, alpha, beta, log.p = FALSE, lower.tail = TRUE)

rmoezipf(n, alpha, beta)

Arguments

x, q

Vector of positive integer values.

alpha

Value of the \(\alpha\) parameter (\(\alpha > 1\) ).

beta

Value of the \(\beta\) parameter (\(\beta > 0\) ).

log, log.p

Logical; if TRUE, probabilities p are given as log(p).

lower.tail

Logical; if TRUE (default), probabilities are \(P[X \leq x]\), otherwise, \(P[X > x]\).

p

Vector of probabilities.

n

Number of random values to return.

Value

dmoezipf gives the probability mass function, pmoezipf gives the cumulative distribution function, qmoezipf gives the quantile function, and rmoezipf generates random values from a MOEZipf distribution.

Details

The probability mass function at a positive integer value \(x\) of the MOEZipf distribution with parameters \(\alpha\) and \(\beta\) is computed as follows:

$$p(x | \alpha, \beta) = \frac{x^{-\alpha} \beta \zeta(\alpha) }{[\zeta(\alpha) - \bar{\beta} \zeta (\alpha, x)] [\zeta (\alpha) - \bar{\beta} \zeta (\alpha, x + 1)]},\, x = 1,2,...,\, \alpha > 1, \beta > 0, $$

where \(\zeta(\alpha)\) is the Riemann-zeta function at \(\alpha\), \(\zeta(\alpha, x)\) is the Hurtwitz zeta function with arguments \(\alpha\) and x, and \(\bar{\beta} = 1 - \beta\).

The cumulative distribution function, at a given positive integer value \(x\), is computed as \(F(x) = 1 - S(x)\), where the survival function \(S(x)\) is equal to: $$S(x) = \frac{\beta\, \zeta(\alpha, x + 1)}{\zeta(\alpha) - \bar{\beta}\,\zeta(\alpha, x + 1)},\, x = 1, 2, .. $$

The quantile of the MOEZipf\((\alpha, \beta)\) distribution of a given probability value p is equal to the quantile of the Zipf\((\alpha)\) distribution at the value: $$p\prime = \frac{p\,\beta}{1 + p\,(\beta - 1)}$$

The quantiles of the Zipf\((\alpha)\) distribution are computed by means of the tolerance package.

To generate random data from a MOEZipf one applies the quantile function over n values randomly generated from an Uniform distribution in the interval (0, 1).

References

Casellas, A. (2013) La distribuci<U+00F3> Zipf Estesa segons la transformaci<U+00F3> Marshall-Olkin. Universitat Polit<U+00E9>cnica de Catalunya.

Devroye L. (1986) Non-Uniform Random Variate Generation. Springer, New York, NY.

Duarte-L<U+00F3>pez, A., Prat-P<U+00E9>rez, A., & P<U+00E9>rez-Casany, M. (2015). Using the Marshall-Olkin Extended Zipf Distribution in Graph Generation. European Conference on Parallel Processing, pp. 493-502, Springer International Publishing.

P<U+00E9>rez-Casany, M. and Casellas, A. (2013) Marshall-Olkin Extended Zipf Distribution. arXiv preprint arXiv:1304.4540.

Young, D. S. (2010). Tolerance: an R package for estimating tolerance intervals. Journal of Statistical Software, 36(5), 1-39.

Examples

Run this code
# NOT RUN {
dmoezipf(1:10, 2.5, 1.3)
pmoezipf(1:10, 2.5, 1.3)
qmoezipf(0.56, 2.5, 1.3)
rmoezipf(10, 2.5, 1.3)

# }

Run the code above in your browser using DataLab