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.$$