Learn R Programming

RTDE (version 0.2-0)

upareto: The unit Pareto Distribution

Description

Density function, distribution function, quantile function, random generation.

Usage

dupareto(x, log = FALSE)
pupareto(q, lower.tail=TRUE, log.p = FALSE)
qupareto(p, lower.tail=TRUE, log.p = FALSE)
rupareto(n)

Arguments

x, q

vector of quantiles.

p

vector of probabilities.

n

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

log, log.p

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

lower.tail

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

Value

dupareto gives the density, pupareto gives the distribution function, qupareto gives the quantile function, and rupareto generates random deviates.

The length of the result is determined by n for rupareto, and is the maximum of the lengths of the numerical parameters for the other functions.

The numerical parameters other than n are recycled to the length of the result. Only the first elements of the logical parameters are used.

Details

The extended Pareto distribution is defined by the following density and distribution function $$ f(x) = \frac{1}{x^2}, F(x) = 1-\frac{1}{x}, $$ for all \(x>0\).

References

Johnson, N.L., Kotz, S. and Balakrishnan, N. (2000), Continuous Univariate Distributions, Volume 1, Second Edition, John Wiley and Sons.

Examples

Run this code
# NOT RUN {
#####
# (1) density function
x <- seq(0, 5, length=24)

cbind(x, dupareto(x))

#####
# (2) distribution function

cbind(x, pupareto(x))




		
# }

Run the code above in your browser using DataLab