rwish: Wishart simulation.

Description Usage Arguments Details Author(s) Examples

Description

Simulate a Wishart-distributed random matrix.

Usage

1
rwish(S0, nu = dim(as.matrix(S0))[1] + 1)

Arguments

S0

a positive definite matrix.

nu

a positive scalar.

Details

This function simulates a Wishart random matrix using Bartletts decomposition, as described in Everson and Morris (2000).

Author(s)

Peter Hoff.

Examples

1
2
3
4
# simulate several matrices and compute the mean.
SS <- matrix(0, 5, 5)
for(s in 1:1000) { SS <- SS + tensr:::rwish(diag(5), 3) }
SS / s


Search within the tensr package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.