Learn R Programming

BDgraph (version 1.0)

BDgraph-package: Bayesian model selection in Gaussian graphical models based on BDMCMC algorithm

Description

BDgraph package is a statistical tool for Bayesian model determination in Gaussian graphical models based on birth-death MCMC methodology.

Arguments

Details

ll{ Package: BDgraph Type: Package Version: 1.0 Date: 2012-09-23 License: GPL(>=3) } This package includes several functions. The main function is BDMCMC which is brith-death MCMC algorithm for Bayesian model selection in Gaussian graphical models.

References

Mohammadi, A. and E. Wit (2012). Efficient birth-death MCMC inference for Gaussian graphical models, Journal of the Royal Statistical Society: Series B, submitted. 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.

See Also

BDMCMC and Phat

Examples

Run this code
n=200; p=8
truK=diag(p)
for (i in 1:(p-1)) truK[i,i+1]=truK[i+1,i]=0.5
truK[1,p]=truK[p,1]=0.4
data=mvrnorm(n,c(rep(0,p)),solve(truK))
data(output.high)
  output <- output.high
output = BDMCMC(data)
# Posterior probability for all possible links in the graph
round(Phat(output),2)

Run the code above in your browser using DataLab