wishart {cmvnorm}R Documentation

The complex Wishart distribution

Description

Returns an observation drawn from the complex Wishart distribution. To sample from the inverse complex Wishart distribution (or indeed the complex inverse Wishart distribution), use solve(rcwis(...)).

Usage

rcwis(n, S)

Arguments

n

Integer; degrees of freedom

S

Variance matrix. If an integer, use diag(nrow=S)

Value

Returns a (semi-) positive definite Hermitian matrix the same size as argument S

Note

The first argument of rcwis() is n, by universal statistics convention. But in the R world, functions returning random observations (such as runif()) generally reserve argument n for the number of observations to return. Although rchisq() uses df for the number of degrees of freedom.

Author(s)

Robin K. S. Hankin

Examples



rcwis(10,2)
eigen(rcwis(7,3),TRUE,TRUE)   # all positive
eigen(rcwis(3,7),TRUE,TRUE)   # 4 positive, 3 zero

rcwis(10,rcwis(10,3))



[Package cmvnorm version 1.0-7 Index]