Density function and random generation from the inverse gamma distribution.

1 2 |

`x` |
Scalar location to evaluate density. |

`n` |
Number of draws from the distribution. |

`shape` |
Scalar shape parameter. |

`scale` |
Scalar scale parameter (default value one). |

An inverse gamma random variable with shape *a* and scale
*b* has mean *b/(a-1)* (assuming *a>1*) and
variance *(b^2)/((a-1)^2 (a-2))* (assuming
*a>2*).

`dinvgamma`

evaluates the density at `x`

. `rinvgamma`

takes
`n`

draws from the inverse Gamma distribution. The parameterization is
consistent with the Gamma Distribution in the stats package.

Andrew D. Martin <admartin@wustl.edu>, Kevin M. Quinn <kquinn@law.berkeley.edu>, and Jong Hee Park <jhp@uchicago.edu>

Andrew Gelman, John B. Carlin, Hal S. Stern, and Donald
B. Rubin. 2004. *Bayesian Data Analysis*. 2nd Edition. Boca Raton:
Chapman & Hall.

1 2 3 4 5 |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.