rPseudoWishart {CholWishart}R Documentation

Random Pseudo Wishart Distributed Matrices

Description

Generate n random matrices, distributed according to the pseudo Wishart distribution with parameters Sigma and df, W_p(\Sigma, df), with sample size df less than the dimension p.

Let X_i, i = 1, 2, ..., df be df observations of a multivariate normal distribution with mean 0 and covariance Sigma. Then \sum X_i X_i' is distributed as a pseudo Wishart W_p(\Sigma, df). Sometimes this is called a singular Wishart distribution, however, that can be confused with the case where \Sigma itself is singular. If cases with a singular \Sigma are desired, this function cannot provide them.

Usage

rPseudoWishart(n, df, Sigma)

Arguments

n

integer sample size.

df

integer parameter, "degrees of freedom", should be less than the dimension of p

Sigma

positive definite p \times p "scale" matrix, the matrix parameter of the distribution.

Value

a numeric array, say R, of dimension p \times p \times n, where each R[,,i] is a realization of the pseudo Wishart distribution W_p(Sigma, df).

References

Diaz-Garcia, Jose A, Ramon Gutierrez Jaimez, and Kanti V Mardia. 1997. “Wishart and Pseudo-Wishart Distributions and Some Applications to Shape Theory.” Journal of Multivariate Analysis 63 (1): 73–87. doi: 10.1006/jmva.1997.1689.

Uhlig, Harald. "On Singular Wishart and Singular Multivariate Beta Distributions." Ann. Statist. 22 (1994), no. 1, 395–405. doi: 10.1214/aos/1176325375.

See Also

rWishart, rInvWishart, and rGenInvWishart

Examples

set.seed(20181227)
A <- rPseudoWishart(1L, 4L, 5.0 * diag(5L))[, , 1]
# A should be singular
eigen(A)$values

[Package CholWishart version 1.1.2 Index]