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

invgamma

Inverse Gamma Distribution


Description

Density, distribution function, quantile function, and random draws from the inverse gamma distribution.

Usage

dinvgamma(x, shape, rate, logscale = FALSE)
pinvgamma(x, shape, rate, lower.tail = TRUE, logscale = FALSE)
qinvgamma(p, shape, rate, lower.tail = TRUE, logscale = FALSE)
rinvgamma(n, shape, rate)

Arguments

x

A vector of deviates where the density or distribution function is to be evaluated.

p

A vector of probabilities representing CDF values (if lower.tail == TRUE) or survivor function values (if lower.tail == FALSE) from the inverse gamma distribution.

n

The desired number of draws from the inverse gamma distribution.

shape

The shape parameter.

rate

The 'rate' parameter. NOTE: The term 'rate' is used to match the corresponding parameter in rgamma. Much of the rest of the world calls this the 'scale' parameter.

logscale

Logical. If TRUE then probabilities or density values are interpreted on the log scale. Otherwise the scale is the probability or probability density scale.

lower.tail

Logical. If TRUE then cumulative probabilities are measured from zero, as in a CDF. If FALSE then cumulative are measured from infinity, as in a survivor function.

Value

  • rinvgamma returns draws from the distribution.

  • dinvgamma returns the density function.

  • pinvgamma returns the cumulative distribution function (or survivor function, if lower.tail == FALSE).

  • qinvgamma returns quantiles from the distribution. qinvgamma and pinvgamma are inverse functions.

Author(s)


Boom

Bayesian Object Oriented Modeling

v0.9.7
LGPL-2.1 | file LICENSE
Authors
Steven L. Scott is the sole author and creator of the BOOM project. Some code in the BOOM libraries has been modified from other open source projects. These include Cephes (obtained from Netlib, written by Stephen L. Moshier), NEWUOA (M.J.D Powell, obtained from Powell's web site), and a modified version of the R math libraries (R core development team). Original copyright notices have been maintained in all source files. In these cases, copyright claimed by Steven L. Scott is limited to modifications made to the original code. Google claims copyright for code written while Steven L. Scott was employed at Google from 2008 - 2018, but BOOM is not an officially supported Google project.
Initial release
2021-02-15

We don't support your browser anymore

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