Generates random matrices, distributed according to the G-Wishart distribution with parameters b and D, $W_G(b, D)$.
Usage
rgwish( n = 1, G = NULL, b = 3, D = NULL )
Arguments
n
The number of samples required. The default value is 1.
G
The adjacency matrix corresponding to the graph structure. It should be an upper triangular matrix in which $g_{ij}=1$
if there is a link between notes $i$ and $j$, otherwise $g_{ij}=0$.
b
The degree of freedom for G-Wishart distribution, $W_G(b, D)$. The default value is 3.
D
The positive definite $(p \times p)$ "scale" matrix for G-Wishart distribution, $W_G(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 G-Wishart distribution, $W_G(b, D)$.
Details
Sampling from G-Wishart distribution, $K \sim W_G(b, D)$, with density:
$$Pr(K) \propto |K| ^ {(b - 2) / 2} \exp \left{- \frac{1}{2} \mbox{trace}(K \times D)\right},$$
which $b > 2$ is the degree of freedom and D is a symmetric positive definite matrix.
References
Lenkoski, A. (2013). A direct sampler for G-Wishart variates, Stat, 2:119-128
Mohammadi, A. and E. Wit (2015). Bayesian Structure Learning in Sparse Gaussian Graphical Models, Bayesian Analysis, 10(1):109-138
Mohammadi, A. and E. Wit (2015). BDgraph: An R Package for Bayesian Structure Learning in Graphical Models, arXiv:1501.05108
Mohammadi, A., F. Abegaz Yazew, E. van den Heuvel, and E. Wit (2015). Bayesian Gaussian Copula Graphical Modeling for Dupuytren Disease, arXiv:1501.04849