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

dtruncpareto(x, lower, upper, shape, log = FALSE)
ptruncpareto(q, lower, upper, shape, lower.tail = TRUE, log.p = FALSE)
qtruncpareto(p, lower, upper, shape)
rtruncpareto(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.

lower.tail, log.p

Same meaning as in pnorm or qnorm.

Value

dtruncpareto gives the density, ptruncpareto gives the distribution function, qtruncpareto gives the quantile function, and rtruncpareto generates random deviates.

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.

Author

T. W. Yee and Kai Huang

Details

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

See also

Examples

 lower <- 3; upper <- 8; kay <- exp(0.5)
if (FALSE)  xx <- seq(lower - 0.5, upper + 0.5, len = 401)
plot(xx, dtruncpareto(xx, low = lower, upp = upper, shape = kay),
     main = "Truncated Pareto density split into 10 equal areas",
     type = "l", ylim = 0:1, xlab = "x")
#> Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'plot': object 'xx' not found
abline(h = 0, col = "blue", lty = 2)
#> Error in int_abline(a = a, b = b, h = h, v = v, untf = untf, ...): plot.new has not been called yet
qq <- qtruncpareto(seq(0.1, 0.9, by = 0.1), low = lower, upp = upper,
                   shape = kay)
lines(qq, dtruncpareto(qq, low = lower, upp = upper, shape = kay),
      col = "purple", lty = 3, type = "h")
#> Error in plot.xy(xy.coords(x, y), type = type, ...): plot.new has not been called yet
lines(xx, ptruncpareto(xx, low = lower, upp = upper, shape = kay),
      col = "orange")  # \dontrun{}
#> Error: object 'xx' not found
pp <- seq(0.1, 0.9, by = 0.1)
qq <- qtruncpareto(pp, lower = lower, upper = upper, shape = kay)

ptruncpareto(qq, lower = lower, upper = upper, shape = kay)
#> [1] 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9
qtruncpareto(ptruncpareto(qq, lower = lower, upper = upper, shape = kay),
         lower = lower, upper = upper, shape = kay) - qq  # Should be all 0
#> [1] 0 0 0 0 0 0 0 0 0