3

I need to find the inverse of the gamma cumulative distribution. I know there is GAMMA.INV(probability,alpha,beta) function just to do that in excel. How can I achieve this in R language?

ipman
  • 1,212
  • 2
  • 21
  • 29

1 Answers1

16

In R, for most probability distributions, there are four functions, called d, p, q, r, (e.g., dnorm, pnorm, qnorm, rnorm) giving you the density (d), cumulative distribution function (p, since the result is a probability), its inverse (q, since the result is a quantile), and r to sample from the distribution.

For the Gamma distribution, the inverse of the cumulative distribution function is therefore qgamma.

Vincent Zoonekynd
  • 31,893
  • 5
  • 69
  • 78