dpareto(x, a = 1, b = 1, log = FALSE)
ppareto(q, a = 1, b = 1, lower.tail = TRUE, log.p = FALSE)
qpareto(p, a = 1, b = 1, lower.tail = TRUE, log.p = FALSE)
rpareto(n, a = 1, b = 1)
length(n) > 1
,
the length is taken to be the number required.Cumulative distribution function
Quantile function
x <- rpareto(1e5, 5, 16)
xx <- seq(-100, 100, by = 0.001)
hist(x, 100, freq = FALSE)
lines(xx, dpareto(xx, 5, 16), col = "red")
hist(ppareto(x, 5, 16))
plot(ecdf(x))
lines(xx, ppareto(xx, 5, 16), col = "red", lwd = 2)
Run the code above in your browser using DataLab