Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

cdfgam

Gamma distribution


Description

Distribution function and quantile function of the gamma distribution.

Usage

cdfgam(x, para = c(1, 1))
quagam(f, para = c(1, 1))

Arguments

x

Vector of quantiles.

f

Vector of probabilities.

para

Numeric vector containing the parameters of the distribution, in the order alpha, beta (shape, scale).

Details

The gamma distribution with shape parameter alpha and scale parameter beta has probability density function

f(x) = x^alpha exp(-x/beta) / ( beta^alpha Gamma(alpha) )

for x >= 0, where Gamma(.) is the gamma function.

Value

cdfgam gives the distribution function; quagam gives the quantile function.

Note

The functions expect the distribution parameters in a vector, rather than as separate arguments as in the standard R functions pgamma and qgamma.

See Also

gamma for the gamma function.

pgamma for the standard R version of the gamma distribution.

cdfpe3 for the Pearson type III distribution, which generalizes the gamma distribution.

Examples

# Random sample from the gamma distribution
# with shape parameter 4 and mean 1.
quagam(runif(100), c(4,1/4))

lmom

L-Moments

v2.8
Common Public License Version 1.0
Authors
J. R. M. Hosking
Initial release
2019-03-11

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.