Learn R Programming

VGAM (version 0.9-1)

Tpareto: The Truncated Pareto Distribution

Description

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

Usage

dtpareto(x, lower, upper, shape, log = FALSE)
ptpareto(q, lower, upper, shape)
qtpareto(p, lower, upper, shape)
rtpareto(n, lower, upper, shape)

Arguments

x, q
vector of quantiles.
p
vector of probabilities.
n, log
Same meaning as runif.
lower, upper, shape
the lower, upper and shape ($k$) parameters. If necessary, values are recycled.

Value

  • dtpareto gives the density, ptpareto gives the distribution function, qtpareto gives the quantile function, and rtpareto generates random deviates.

Details

See tpareto1, 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.

References

Aban, I. B., Meerschaert, M. M. and Panorska, A. K. (2006) Parameter estimation for the truncated Pareto distribution, Journal of the American Statistical Association, 101(473), 270--277.

See Also

tpareto1.

Examples

Run this code
lower <- 3; upper <- 8; kay <- exp(0.5)
xx <- seq(lower - 0.5, upper + 0.5, len = 401)
plot(xx, dtpareto(xx, low = lower, upp = upper, shape = kay),
     main = "Truncated Pareto density split into 10 equal areas",
     type = "l", ylim = 0:1, xlab = "x")
abline(h = 0, col = "blue", lty = 2)
qq <- qtpareto(seq(0.1, 0.9, by = 0.1), low = lower, upp = upper,
               shape = kay)
lines(qq, dtpareto(qq, low = lower, upp = upper, shape = kay),
      col = "purple", lty = 3, type = "h")
lines(xx, ptpareto(xx, low = lower, upp = upper, shape = kay),
      col = "orange")
pp <- seq(0.1, 0.9, by = 0.1)
qq <- qtpareto(pp, low = lower, upp = upper, shape = kay)

ptpareto(qq, low = lower, upp = upper, shape = kay)
qtpareto(ptpareto(qq, low = lower, upp = upper, shape = kay),
         low = lower, upp = upper, shape = kay) - qq # Should be all 0

Run the code above in your browser using DataLab