Skip to contents

Density, distribution function, quantile function and random generation for the Uniform-Geometric distribution.

Usage

dugd(x, theta, log = FALSE)

pugd(q, theta, lower.tail = TRUE, log.p = FALSE)

qugd(p, theta, lower.tail = TRUE)

rugd(n, theta)

Arguments

x, q

vector of quantiles.

theta

a parameter.

log, log.p

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

lower.tail

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

p

vector of probabilities.

n

number of observations. If length(n) > 1, the length is taken to be the number required.

Value

dugd gives the density, pugd gives the distribution function, qugd gives the quantile function and rugd generates random deviates.

Details

The Uniform-Geometric distribution with shape parameter \(\theta\), has density $$f\left( x\right) =\theta \left( 1-\theta \right) ^{x-1}LerchPhi \left[ \left(1-\theta \right) ,1,x\right],$$ where $$LerchPhi\left( z,a,v\right) =\sum_{n=0}^{\infty }\frac{z^{n}} {\left(v+n\right) ^{a}}$$ and $$x=1,2,...~,~~0<\theta <1.$$

References

Akdoğan, Y., Kuş, C., Asgharzadeh, A., Kınacı, İ., & Sharafi, F. (2016). Uniform-geometric distribution. Journal of Statistical Computation and Simulation, 86(9), 1754-1770.

Examples

library(new.dist)
dugd(1, theta=0.5)
#> [1] 0.6931472
pugd(1,theta=.5)
#> [1] 0.6931472
qugd(0.6,theta=.1)
#> [1] 4
rugd(10,theta=.1)
#>  [1] 12  2  6  4  1  1  2  1  3  8