R: Random number generation for inverse gamma distribution

rigamma {LearnBayes} | R Documentation

## Random number generation for inverse gamma distribution

### Description

Simulates from a inverse gamma (a, b) distribution with density proportional to $y^(-a-1) exp(-b/y)$

### Usage

    rigamma(n, a, b)

### Arguments

`n` | number of random numbers to be generated
`a` | inverse gamma shape parameter
`b` | inverse gamma rate parameter

### Value

vector of n simulated draws

### Author(s)

Jim Albert

### Examples

    a=10
    b=5
    n=20
    rigamma(n,a,b)

[Package LearnBayes version 2.15 Index]