rInvGamma {bbricks}R Documentation

Random number generation of Inverse-Gamma distribution

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

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.


[Package bbricks version 0.1.4 Index]