Generate n
random matrices, distributed according to the Wishart distribution with parameters Sigma
and df
, W_p(Sigma, df).
rPsuedoWishart(n, df, Sigma, covariance = FALSE, simplify = "array")
integer: the number of replications.
numeric parameter, “degrees of freedom”.
positive definite (\(p\times p\)) “scale” matrix, the matrix parameter of the distribution.
logical on whether a covariance matrix should be generated
logical or character string; should the result be
simplified to a vector, matrix or higher dimensional array if
possible? For sapply
it must be named and not abbreviated.
The default value, TRUE
, returns a vector or matrix if appropriate,
whereas if simplify = "array"
the result may be an
array
of “rank”
(\(=\)length(dim(.))
) one higher than the result
of FUN(X[[i]])
.
A numeric array of dimension p * p * n
, where each array is a positive semidefinite matrix, a realization of the Wishart distribution W_p(Sigma, df)
If X_1, ..., X_m is a sample of m independent multivariate Gaussians with mean vector 0, and covariance matrix Sigma, the distribution of M = X'X is W_p(Sigma, m).
Diaz-Garcia, Jose A, Ramon Gutierrez Jaimez, and Kanti V Mardia. 1997. <U+201C>Wishart and Pseudo-Wishart Distributions and Some Applications to Shape Theory.<U+201D> Journal of Multivariate Analysis 63 (1): 73<U+2013>87. doi:10.1006/jmva.1997.1689.
# NOT RUN {
rPsuedoWishart(2, 5, diag(1, 20))
# }
Run the code above in your browser using DataLab