Learning multiple Gaussian graphical models by Bayesian
This package can be installed using the devtools
package in R:
library(devtools)
devtools::install_github("jlin-vt/BMGGM")
library(BMGGM)
To get started, the user is recommended to generate some synthetic data.
set.seed(50)
p <- 10
K <- 4
n <- 400
dat <- GenerateData(p, K, n)
The second step is to set the options for MCMC.
options <- list()
options$burnin <- 10000
options$nmc <- 10000
You also need to intialize the priors.
PriorPar <- list()
PriorPar$a <- 1
PriorPar$b <- 5
PriorPar$a0 <- 1
PriorPar$b0 <- 10
PriorPar$eps <- 10000
PriorPar$delta <- 1
PriorPar$c <- 100
PriorPar$Theta <- matrix(0.2, K, K)
Intialize the updates for the parameters.
InitVal <- list()
InitVal$sigma2 <- 1
InitVal$mu <- rep(0, p * K)
InitVal$Beta <- matrix(runif((p * K) * (p * K)), p * K, p * K)
InitVal$adj <- ifelse(InitVal$Beta, 1, 0)
Finally, apply MCMC sampler to execute BMGGM:
# Run
res <- Bmggm(dat, options, PriorPar, InitVal)
adj_save <- res$adj_save
The vignette demonstrates example usage of all main functions.
The preprint describing the corncob methodology is available here. The manuscript has been submitted to Biometrics.
If you encounter a bug or would like make a change request, please file it as an issue here.
The package is available under the terms of the GNU General Public License v3.0.