Learn R Programming

BDgraph (version 2.33)

rcwish: Sampling from Complex Wishart distribution

Description

Generates random matrices, distributed according to the complex Wishart distribution with parameters b and D, \(CW(b, D)\).

Usage

rcwish( n = 1, p = 2, b = 3, D = diag(p) )

Arguments

n
The number of samples required. The default value is 1.
p
The number of variables (nodes). The default value is 2.
b
The degree of freedom for complex Wishart distribution, \(CW(b, D)\). The default value is 3.
D
The positive definite \((p \times p)\) "scale" matrix for complex Wishart distribution, \(CW(b, D)\). The default is an identity matrix.

Value

A numeric array, say A, of dimension \((p \times p \times n)\), where each \(A[,,i]\) is a positive definite matrix, a realization of the complex Wishart distribution \(CW(b, D)\).

Details

Sampling from complex Wishart distribution, \(K \sim CW(b, D)\), with density: $$Pr(K) \propto |K| ^ {b} \exp \left\{- \mbox{trace}(K \times D)\right\},$$ which \(b > 2\) is the degree of freedom and D is a symmetric positive definite matrix.

References

Tank, A., N. Foti, and E. Fox (2015). Bayesian Structure Learning for Stationary Time Series, arXiv:1505.03131 D.R. Brillinger (2001). Time Series: Data Analysis and Theory, Holden-Day Mohammadi, A. and E. Wit (2015). BDgraph: An R Package for Bayesian Structure Learning in Graphical Models, arXiv:1501.05108

Examples

Run this code
## Not run: ------------------------------------
# p      <- 5
# sample <- rcwish( n = 3, p = p, b = 3, D = diag(p) )
# round( sample, 2 )  
## ---------------------------------------------

Run the code above in your browser using DataLab