rgcwish {BDgraph}R Documentation

Sampling from complex G-Wishart distribution

Description

Generates random matrices, distributed according to the complex G-Wishart distribution with parameters b and D, CW_G(b, D).

Usage

 rgcwish( n = 1, adj = NULL, b = 3, D = NULL ) 

Arguments

n

The number of samples required.

adj

The adjacency matrix corresponding to the graph structure which can be non-decomposable or decomposable. It should be an upper triangular matrix in which a_{ij}=1 if there is a link between notes i and j, otherwise a_{ij}=0. adj could be an object of class "graph", from function graph.sim. It also could be an object of class "sim", from function bdgraph.sim. It also could be an object of class "bdgraph", from functions bdgraph.mpl or bdgraph.

b

The degree of freedom for complex G-Wishart distribution, CW_G(b, D).

D

The positive definite (p \times p) "scale" matrix for complex G-Wishart distribution, CW_G(b, D). The default is an identity matrix.

Details

Sampling from the complex G-Wishart distribution, K \sim CW_G(b, D), with density:

Pr(K) \propto |K| ^ {b} \exp ≤ft\{- \mbox{trace}(K \times D)\right\},

which b > 2 is the degree of freedom and D is a symmetric positive definite 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 G-Wishart distribution, CW_G(b, D).

Author(s)

Lang Liu, Nicholas Foti, Alex Tank and Reza Mohammadi a.mohammadi@uva.nl

References

Tank, A., Foti, N., and Fox, E. (2015). Bayesian Structure Learning for Stationary Time Series, arXiv preprint arXiv:1505.03131

Mohammadi, R. and Wit, E. C. (2019). BDgraph: An R Package for Bayesian Structure Learning in Graphical Models, Journal of Statistical Software, 89(3):1-30

See Also

rgwish, rwish

Examples

## Not run: 
# Generating a 'circle' graph as a non-decomposable graph
adj <- graph.sim( p = 5, graph = "circle" )
adj    # adjacency of graph with 5 nodes
   
sample <- rgcwish( n = 3, adj = adj, b = 3, D = diag( 5 ) )
round( sample, 2 )  

## End(Not run)

[Package BDgraph version 2.60 Index]