Learn R Programming

monomvn (version 1.9-21)

rwish: Draw from the Wishart Distribution

Description

Random generation from the Wishart distribution.

Usage

rwish(v, S)

Value

Returns generates one random draw from the distribution which is a

matrix with the same dimensions as S

Arguments

v

degrees of freedom (scalar)

S

inverse scale matrix \((p \times p)\)

Details

The mean of a Wishart random variable with v degrees of freedom and inverse scale matrix S is \(vS\).

References

This was copied from the MCMCpack package

Examples

Run this code
draw <- rwish(3, matrix(c(1,.3,.3,1),2,2))

Run the code above in your browser using DataLab