RATS 11.1
RATS 11.1

Parameters

Degrees of freedom (\(\nu\)) and scale (\(\tau ^2\)). An inverse chi-squared is the reciprocal of a chi-squared combined with scaling factor which represents a "target'' variance that the distribution is intended to represent. (Note that the mean is roughly \(\tau ^2\) for large degrees of freedom.)

Kernel

\(x^{-(a+1)}\exp \left( -{b}{x^{-1}}\right) \)

Support

\(\left[ 0,\infty \right) \)

Mean

\(\frac{{\nu {\tau ^2}}}{{\nu  - 2}}\) if \(\nu > 2\)

Variance

\(\frac{{2{\nu ^2}{\tau ^4}}}{{{{\left( {\nu  - 2} \right)}^2}(\nu  - 4)}}\) if \(\nu > 4\)

Main Uses

Prior, exact and approximate posterior for the variance of residuals or other shocks in a model. The closely-related inverse gamma can be used for that as well, but the scaled inverse chi-squared tends to be more intuitive.

Density Function

%LogInvChiSqrDensity(x,nu,tausq)

Moment Matching

%InvChisqrParms(mean,sd) (external function) returns the 2-vector of parameters ( \((\nu,\tau ^2)\) in that order) for the parameters of an inverse chi-squared with the given mean and standard deviation. If sd is the missing value, this will return \(\nu=4\), which is the largest value of $\nu$ which gives an infinite variance.

Random Draws

You can use (nu*tausq)/%ranchisqr(nu). Note that you divide by the random chi-squared.


 


Copyright © 2026 Thomas A. Doan