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

rigamma

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)

LearnBayes

Functions for Learning Bayesian Inference

v2.15.1
GPL (>= 2)
Authors
Jim Albert
Initial release
2018-03-18

We don't support your browser anymore

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