Search This Blog

Sunday, April 01, 2012

R: The Pareto Distribution


Pareto {VGAM}R Documentation

The Pareto Distribution

Description

Density, distribution function, quantile function and random generation for the Pareto(I) distribution with parameters location and shape.

Usage

dpareto(x, location, shape, log=FALSE)
ppareto(q, location, shape)
qpareto(p, location, shape)
rpareto(n, location, shape)

Arguments

x, q vector of quantiles.
p vector of probabilities.
n number of observations. Must be a single positive integer.
location, shape the alpha and k parameters.
log Logical. If log=TRUE then the logarithm of the density is returned.

Details

See pareto1, the VGAM family function for estimating the parameter k by maximum likelihood estimation, for the formula of the probability density function and the range restrictions imposed on the parameters.

Value

dpareto gives the density, ppareto gives the distribution function, qpareto gives the quantile function, and rpareto generates random deviates.

Author(s)

T. W. Yee

References

Evans, M., Hastings, N. and Peacock, B. (2000) Statistical Distributions, New York: Wiley-Interscience, Third edition.

See Also

pareto1, ParetoIV.

Examples

alpha = 3; k = exp(1); x = seq(2.8, 8, len=300)
## Not run: 
plot(x, dpareto(x, location=alpha, shape=k), type="l",
     main="Pareto density split into 10 equal areas")
abline(h=0, col="blue", lty=2)
qq = qpareto(seq(0.1,0.9,by=0.1),location=alpha,shape=k)
lines(qq, dpareto(qq, loc=alpha, shape=k), col="purple", lty=3, type="h")
## End(Not run)
pp = seq(0.1,0.9,by=0.1)
qq = qpareto(pp, location=alpha, shape=k)
ppareto(qq, location=alpha, shape=k)
qpareto(ppareto(qq,loc=alpha,shape=k),loc=alpha,shape=k) - qq # Should be 0

[Package VGAM version 0.7-9 Index]

No comments:

Post a Comment

Thank you