rwishart: Random Whishart matrix
Description
Generate a draw from a Wishart distribution.Usage
rwishart(df, p = nrow(SqrtSigma), SqrtSigma = diag(p))
Arguments
df
Degrees of freedom. It has to be integer.
p
Dimension of the matrix to simulate.
SqrtSigma
A "square root" of the matrix parameter Sigma of the
Wishart distribution. Sigma must be equal to crossprod(SqrtSigma)
.
Value
- The function returns one draw from the Wishart distribution with
df
degrees of freedom and matrix parameter
crossprod(SqrtSigma)
Warning
The function only works for an integer number
of degrees of freedom.References
Mardia, Kent and Bibby (1979). Multivariate analysis.