Learn R Programming

cmvnorm (version 1.0-7)

wishart: 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

Examples

Run this code
# NOT RUN {

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))


# }

Run the code above in your browser using DataLab