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

gamma.prior

Gamma prior distribution


Description

Specifies gamma prior distribution.

Usage

GammaPrior(a = NULL, b = NULL, prior.mean = NULL, initial.value = NULL)
  TruncatedGammaPrior(a = NULL, b = NULL, prior.mean = NULL,
                      initial.value = NULL,
                      lower.truncation.point = 0,
                      upper.truncation.point = Inf)

Arguments

a

The shape parameter in the Gamma(a, b) distribution.

b

The scale paramter in the Gamma(a, b) distribution.

prior.mean

The mean the Gamma(a, b) distribution, which is a/b.

initial.value

The initial value in the MCMC algorithm of the variable being modeled.

lower.truncation.point

The lower limit of support for the truncated gamma distribution.

upper.truncation.point

The upper limit of support for the truncated gamma distribution.

Details

The mean of the Gamma(a, b) distribution is a/b and the variance is a/b^2. If prior.mean is not NULL, then one of either a or b must be non-NULL as well.

GammaPrior is the conjugate prior for a Poisson mean or an exponential rate. For a Poisson mean a corresponds to a prior sum of observations and b to a prior number of observations. For an exponential rate the roles are reversed a represents a number of observations and b the sum of the observed durations. The gamma distribution is a generally useful for parameters that must be positive.

The gamma distribution is the conjugate prior for the reciprocal of a Guassian variance, but SdPrior should usually be used in that case.

A TruncatedGammaPrior is a GammaPrior with support truncated to the interval (lower.truncation.point, upper.truncation.point).

If an object specifically needs a GammaPrior you typically cannot pass a TruncatedGammaPrior.

Author(s)

References

Gelman, Carlin, Stern, Rubin (2003), "Bayesian Data Analysis", Chapman and Hall.


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.