These functions provide the density and random number generation for the inverse Wishart distribution.
This is the symmetric, positive-definite k x k matrix Sigma.
This is the scalar degrees of freedom, nu.
This is the symmetric, positive-semidefinite k x k scale matrix S.
Application: Continuous Multivariate
Density: p(theta) = (2^(nu*k/2) * pi^(k(k-1)/4) * [Gamma((nu+1-i)/2) * ... * Gamma((nu+1-k)/2)])^(-1) * |S|^(nu/2) * |Omega|^(-(nu-k-1)/2) * exp(-(1/2) * tr(S Omega^(-1)))
Inventor: John Wishart (1928)
Notation 1: Sigma ~ W^(-1)[nu](S^(-1))
Notation 2: p(Sigma) = W^-1[nu](Sigma | S^(-1))
Parameter 1: degrees of freedom nu
Parameter 2: symmetric, positive-semidefinite k x k scale matrix S
Mean: E(Sigma) = S / (nu - k - 1)
Mode: mode(Sigma) = S / (nu + k + 1)
The inverse Wishart distribution is a probability distribution defined on real-valued, symmetric, positive-definite matrices, and is used as the conjugate prior for the covariance matrix, Sigma, of a multivariate normal distribution. The inverse-Wishart density is always finite, and the integral is always finite. A degenerate form occurs when nu < k.
When applicable, the alternative Cholesky parameterization should be
preferred. For more information, see
The inverse Wishart prior lacks flexibility, having only one parameter, nu, to control the variability for all k(k + 1)/2 elements. Popular choices for the scale matrix S include an identity matrix or sample covariance matrix. When the model sample size is small, the specification of the scale matrix can be influential.
One of many alternatives is to use hierarchical priors,
in which the main diagonal of the (identity) scale matrix and the
degrees of freedom are treated as unknowns (Bouriga and Feron, 2011;
Daniels and Kass, 1999). A hierarchical inverse Wishart prior provides
shrinkage toward diagonality. Another alternative is to abandon the
inverse Wishart distribution altogether for the more flexible method of
Barnard et al. (2000) or the horseshoe distribution (
for sparse covariance matrices.
These functions are parameterized as per Gelman et al. (2004).
dinvwishart gives the density and
rinvwishart generates random deviates.
Barnard, J., McCulloch, R., and Meng, X. (2000). "Modeling Covariance Matrices in Terms of Standard Deviations and Correlations, with Application to Shrinkage". Statistica Sinica, 10, p. 1281–1311.
Bouriga, M. and Feron, O. (2011). "Estimation of Covariance Matrices Based on Hierarchical Inverse-Wishart Priors". URL: http://www.citebase.org/abstract?id=oai:arXiv.org:1106.3203.
Daniels, M., and Kass, R. (1999). "Nonconjugate Bayesian Estimation of Covariance Matrices and its use in Hierarchical Models". Journal of the American Statistical Association, 94(448), p. 1254–1263.
Gelman, A., Carlin, J., Stern, H., and Rubin, D. (2004). "Bayesian Data Analysis, Texts in Statistical Science, 2nd ed.". Chapman and Hall, London.
Wishart, J. (1928). "The Generalised Product Moment Distribution in Samples from a Normal Multivariate Population". Biometrika, 20A(1-2), p. 32–52.
1 2 3
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.