Learn R Programming

MSBVAR (version 0.1.1)

rwishart: Random deviates from a Wishart distribution

Description

Draws deviates from a Wishart pdf.

Usage

rwishart(N, df, Sigma)

Arguments

Value

Returns an N dimensional array of dim(Sigma) matrices for the Wishart random deviates. If N=1, it returns a single matrix.

Details

Draws N matrices of drawss from a Wishart with mean Sigma.

See Also

See also as rmultnorm for multivariate normal deviates and rgamma for the univariate analog to drawing Wishart deviates.

Examples

Run this code
x <- matrix(rnorm(100), 50, 2)
XX <- crossprod(x)
tmp <- rwishart(1, 50, XX)

Run the code above in your browser using DataLab