rInvGamma: Random number generation of Inverse-Gamma distribution

Description Usage Arguments Value

View source: R/Gamma_Inference.r

Description

Generation random samples from Inverse-Gamma distribution. For a random variable x, the density function is defined as:

(rate^shape)/Gamma(shape) x^{-shape-1} exp(-rate/x)

Where Gamma() is the Gamma function.

Usage

1
rInvGamma(n, shape, scale)

Arguments

n

integer, number of samples to be generated.

shape

numeric, the shape parameter of gamma distribution.

scale

numeric, the scale, or inverse-scale parameter of gamma distribution. The 'rate' parameter in Gamma is the 'scale' parameter in InvGamma.

Value

A numeric vector, samples of Inverse-Gamma distribution.


bbricks documentation built on July 8, 2020, 7:29 p.m.