Learn R Programming

tolerance (version 1.2.0)

DiscretePareto: Discrete Pareto Distribution

Description

Density (mass), distribution function, quantile function, and random generation for the discrete Pareto distribution.

Usage

ddpareto(x, theta, log = FALSE) pdpareto(q, theta, lower.tail = TRUE, log.p = FALSE) qdpareto(p, theta, lower.tail = TRUE, log.p = FALSE) rdpareto(n, theta)

Arguments

x, q
Vector of quantiles.
p
Vector of probabilities.
n
The number of observations. If length>1, then the length is taken to be the number required.
theta
The shape parameter, which must be greater than 0 and less than 1.
log, log.p
Logical vectors. If TRUE, then the probabilities are given as log(p).
lower.tail
Logical vector. If TRUE, then probabilities are $P[X\le x]$, else $P[X>x]$.

Value

ddpareto gives the density (mass), pdpareto gives the distribution function, qdpareto gives the quantile function, and rdpareto generates random deviates for the specified distribution.

Details

The discrete Pareto distribution has mass $$p(x) = \theta^{\log(1+x)}-\theta^{\log(2+x)},$$ where $x=0,1,\ldots$ and $0

References

Krishna, H. and Pundir, P. S. (2009), Discrete Burr and Discrete Pareto Distributions, Statistical Methodology, 6, 177--188.

Young, D. S., Naghizadeh Qomi, M., and Kiapour, A. (2016), Approximate Discrete Pareto Tolerance Limits for Characterizing Extremes in Count Data, submitted.

See Also

runif and .Random.seed about random number generation.

Examples

Run this code
## Randomly generated data from the discrete Pareto
## distribution.

set.seed(100)
x <- rdpareto(n = 150, theta = 0.2)
hist(x, main = "Randomly Generated Data", prob = TRUE)

x.1 <- sort(x)
y <- ddpareto(x = x.1, theta = 0.2)
lines(x.1, y, col = 2, lwd = 2)

plot(x.1, pdpareto(q = x.1, theta = 0.2), type = "l", 
     xlab = "x", ylab = "Cumulative Probabilities")

qdpareto(p = 0.80, theta = 0.2, lower.tail = FALSE)
qdpareto(p = 0.95, theta = 0.2)

Run the code above in your browser using DataLab