zipfpe: The Zipf-Poisson Extreme Distribution (Zipf-PE).

Description Usage Arguments Details Value References Examples

Description

Probability mass function, cumulative distribution function, quantile function and random number generation for the Zipf-PE distribution with parameters α and β. The support of the Zipf-PE distribution are the strictly positive integer numbers large or equal than one.

Usage

1
2
3
4
5
6
7
dzipfpe(x, alpha, beta, log = FALSE)

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

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

rzipfpe(n, alpha, beta)

Arguments

x, q

Vector of positive integer values.

alpha

Value of the α parameter (α > 1 ).

beta

Value of the β parameter (β\in (-∞, +∞) ).

log, log.p

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

lower.tail

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

p

Vector of probabilities.

n

Number of random values to return.

Details

The probability mass function of the Zipf-PE distribution with parameters α and β at a positive integer value x is computed as follows:

p(x | α, β) = \frac{e^{β (1 - \frac{ζ(α, x)}{ζ(α)})} (e^{β \frac{x^{-α}}{ζ(α)}} - 1)} {e^{β} - 1},\, x= 1,2,...,\, α > 1,\, -∞ < β < +∞,

where ζ(α) is the Riemann-zeta function at α, and ζ(α, x) is the Hurtwitz zeta function with arguments α and x.

The cumulative distribution function at a given positive integer value x, F(x), is equal to:

F(x) = \frac{e^{β (1 - \frac{ζ(α, x + 1)}{ζ(α)})} - 1}{e^{β} -1}

The quantile of the Zipf-PE(α, β) distribution of a given probability value p is equal to the quantile of the Zipf(α) distribution at the value:

p\prime = \frac{log(p\, (e^{β} - 1) + 1)}{β}

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

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

Value

dzipfpe gives the probability mass function, pzipfpe gives the cumulative function, qzipfpe gives the quantile function, and rzipfpe generates random values from a Zipf-PE distribution.

References

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

Examples

1
2
3
4
dzipfpe(1:10, 2.5, -1.5)
pzipfpe(1:10, 2.5, -1.5)
qzipfpe(0.56, 2.5, 1.3)
rzipfpe(10, 2.5, 1.3)

zipfextR documentation built on July 8, 2020, 6:23 p.m.