Learn R Programming

new.dist (version 0.1.1)

ugd: Uniform-Geometric Distribution

Description

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)

Value

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

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.

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

Run this code
library(new.dist)
dugd(1, theta=0.5)
pugd(1,theta=.5)
qugd(0.6,theta=.1)
rugd(10,theta=.1)

Run the code above in your browser using DataLab