RATS 11.1
RATS 11.1

 

Parameters

Scaling \(\Psi \) (symmetric \(n\times n\) matrix) and degrees of freedom (\(\nu \)). This only has a proper density if \(\nu > n - 1\) and \(\Psi \) is positive definite.

Kernel

\(\exp \left( { - \frac{1}{2}trace\left( {\Psi {{\bf{X}}^{ - 1}}} \right)} \right){\left| {\bf{X}} \right|^{^{ - \frac{1}{2}\left( {\nu  + n + 1} \right)}}}\)

Support

Positive definite symmetric matrices

Mean

\(\frac{1}{{\nu  - n - 1}}\Psi \)

Main Uses

Prior, exact and approximate posterior for the covariance matrix of residuals in a multivariate regression with Gaussian residuals

Diffuse Versions

The density function is improper if \(\nu < n - 1\), but the improper prior with \(\nu = 0\) and \(\Psi = 0\) has kernel \(\left| {\bf{X}} \right|^{^{ - \frac{1}{2}\left( {n + 1} \right)}}\) which forms the Jeffreys' prior for inference on the covariance matrix

Combining Densities

If \({\mathbf{X}} \sim IW({\Psi _1},{\nu _1})\) and \({\mathbf{X}} \sim IW({\Psi _2},{\nu _2})\) are inverse Wishart densities for \({\mathbf{X}}\), then the posterior from combining them has \({\mathbf{X}} \sim IW({\Psi _1} + {\Psi _2},{\nu _1} + {\nu _2} + n + 1)\)

Random Draws

%RANWISHARTI(F,nu) draws a single \(n\times n \) inverse Wishart matrix with \({\bf{F}}{{\bf{F}}^\prime } = {\Psi ^{ - 1}}\) and degrees of freedom \(\nu \). Note that \(\bf{F}\) needs to be a factor of the inverse. \(\bf{F}\) can be any factor matrix, but is typically the Cholesky factor, computed using %DECOMP.

Notes

The basic result has the data evidence on the covariance matrix of Gaussian residuals summarized as an inverse Wishart with \(\Psi  = T\hat \Sigma \), where \(T\) is the number of observations and \({\hat \Sigma }\) the sample covariance matrix of residuals (thus \(\Psi\) itself is the sum of the outer products of the residuals). The degrees of freedom for the inverse Wishart from the data itself are typically \(T - (n+1)\) (sometimes less some additional adjustments for regressors, depending upon the form of conditioning). The \(n+1\) is needed because you don't really have the ability to estimate a covariance matrix until you have that many observations. Combining data with the Jeffreys' prior "corrects" the degrees of freedom so the posterior value of \(\nu = T\).
 

An informative prior is generally based upon a prior belief on the value of \(\bf{X}\). Because \(\bf{X}\) is typically the covariance matrix \(\Sigma\), call this \({\Sigma _0}\). The corresponding value of \(\Psi\) for this is \(\alpha {\Sigma _0}\) where the prior degrees of freedom are \(\alpha + n + 1\). Combined with data, this gives an inverse Wishart with \(T + \alpha\) degrees of freedom and \(\Psi\) matrix which is \(T\hat \Sigma + \alpha {\Sigma _0}\) , thus (roughly) sample and non-sample information on \(\Sigma\) weighted by the number of actual and "dummy" observations.

 


Copyright © 2026 Thomas A. Doan