InvWishart {MCMCpack}R Documentation

The Inverse Wishart Distribution

Description

Density function and random generation from the Inverse Wishart distribution.

Usage

   diwish(W, v, S)
   riwish(v, S)

Arguments

W Positive definite matrix W (p x p).
v Inverse Wishart degrees of freedom (scalar).
S Inverse Wishart scale matrix (p x p).

Value

diwish evaluates the density at positive definite matrix W. riwish generates one random draw from the distribution.

Examples

density <- diwish(matrix(c(2,-.3,-.3,4),2,2), 3, matrix(c(1,.3,.3,1),2,2))
draw <- riwish(3, matrix(c(1,.3,.3,1),2,2))

[Package MCMCpack version 0.5-2 Index]