x <- rinvgamma(1e5,20,3)hist(x,100, freq =FALSE)curve(dinvgamma(x,20,3),0,1, col ="red", add =TRUE, n =5000)hist(pinvgamma(x,20,3))plot(ecdf(x))curve(pinvgamma(x,20,3),0,1, col ="red", lwd =2, add =TRUE, n =5000)
References
Witkovsky, V. (2001). Computing the distribution of a linear combination of inverted gamma variables. Kybernetika 37(1), 79-90.
Leemis, L.M. and McQueston, L.T. (2008). Univariate Distribution Relationships. American Statistician 62(1): 45-53.