Learn R Programming

pmwg (version 0.2.7)

rwish: The Wishart Distribution

Description

Random generation from the Wishart distribution.

Usage

rwish(v, S)

Value

rwish generates one random draw from the distribution.

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\).

Examples

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

Run the code above in your browser using DataLab