Learn R Programming

BDgraph (version 2.23)

log_Ig: Log of the normalizing constant of G-Wishart distribution

Description

Calculates log of the normalizing constant of G-Wishart distribution based on the Monte Carlo method, developed by Atay-Kayis and Massam (2005).

Usage

log_Ig( G, b = 3, D = diag( ncol(G) ), mc = 100 )

Arguments

G
The adjacency matrix corresponding to the graph structure. It is 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.
mc
The number of iteration for the Monte Carlo approximation. The default value is 100.

Value

  • Log of the normalizing constant of G-Wishart distribution.

Details

Log of the normalizing constant approximation using Monte Carlo method for a G-Wishart distribution, $K \sim W_G(b, D)$, with density: $$Pr(K) = \frac{1}{I(b, D)} |K| ^ {(b - 2) / 2} \exp \left{- \frac{1}{2} \mbox{trace}(K \times D)\right}.$$

References

Atay-Kayis, A. and H. Massam (2005). A monte carlo method for computing the marginal likelihood in nondecomposable Gaussian graphical models, Biometrika, 92(2):317-335 Mohammadi, A. and E. Wit (2015). Bayesian Structure Learning in Sparse Gaussian Graphical Models, Bayesian Analysis, 10(1):109-138

Examples

Run this code
G <- matrix( c(0,0,1,
               0,0,1,
		               0,0,0), 3, 3, byrow = TRUE )		                
# Matrix G is an adjacency matrix of a graph with 3 nodes and 2 links

log_Ig( G, b = 3, D = diag(3) )

Run the code above in your browser using DataLab