Creates a random inverse wishart distribution when given degrees of freedom and a sigma matrix.

riwishart(df, S)

Arguments

df

An integer that represents the degrees of freedom. (> 0)

S

A matrix with dimensions m x m that provides Sigma, the covariance matrix.

Value

A matrix that is an inverse wishart distribution.

Author

James Joseph Balamuta

Examples

#Call with the following data:
riwishart(3, diag(2))
#>            [,1]       [,2]
#> [1,]  1.1438929 -0.7607902
#> [2,] -0.7607902  0.7059656