x <- rgompertz(1e5, 5, 2)
xx <- seq(0, 1000, by = 0.1)
hist(x, 100, freq = FALSE)
lines(xx, dgompertz(xx, 5, 2), col = "red")
hist(pgompertz(x, 5, 2))
plot(ecdf(x))
lines(xx, pgompertz(xx, 5, 2), col = "red", lwd = 2)
Run the code above in your browser using DataLab