Title: | Bayesian Graphical Lasso |
---|---|
Description: | Implements a data-augmented block Gibbs sampler for simulating the posterior distribution of concentration matrices for specifying the topology and parameterization of a Gaussian Graphical Model (GGM). This sampler was originally proposed in Wang (2012) <doi:10.1214/12-BA729>. |
Authors: | Patrick Trainor [aut, cre], Hao Wang [aut] |
Maintainer: | Patrick Trainor <[email protected]> |
License: | GPL-3 |
Version: | 0.2.0 |
Built: | 2025-02-24 05:18:17 UTC |
Source: | https://github.com/cran/BayesianGLasso |
Blockwise sampling from the conditional distribution of a permuted column/row for simulating the posterior distribution for the concentration matrix specifying a Gaussian Graphical Model
blockGLasso(X, iterations = 2000, burnIn = 1000, lambdaPriora = 1, lambdaPriorb = 1/10, verbose = TRUE)
blockGLasso(X, iterations = 2000, burnIn = 1000, lambdaPriora = 1, lambdaPriorb = 1/10, verbose = TRUE)
X |
Data matrix |
iterations |
Length of Markov chain after burn-in |
burnIn |
Number of burn-in iterations |
lambdaPriora |
Shrinkage hyperparameter (lambda) gamma distribution shape |
lambdaPriorb |
Shrinkage hyperparameter (lambda) gamma distribution scale |
verbose |
logical; if TRUE return MCMC progress |
Implements the block Gibbs sampler for the Bayesian graphical lasso introduced in Wang (2012). Samples from the conditional distribution of a permuted column/row for simulating the posterior distribution for the concentration matrix specifying a Gaussian Graphical Model
Sigma |
List of covariance matrices from the Markov chain |
Omega |
List of concentration matrices from the Markov chains |
Lambda |
Vector of simulated lambda parameters |
Patrick Trainor (University of Louisville)
Hao Wang
Wang, H. (2012). Bayesian graphical lasso models and efficient posterior computation. Bayesian Analysis, 7(4). <doi:10.1214/12-BA729> .
# Generate true covariance matrix: s<-.9**toeplitz(0:9) # Generate multivariate normal distribution: set.seed(5) x<-MASS::mvrnorm(n=100,mu=rep(0,10),Sigma=s) blockGLasso(X=x) # Same example with short MCMC chain: s<-.9**toeplitz(0:9) set.seed(6) x<-MASS::mvrnorm(n=100,mu=rep(0,10),Sigma=s) blockGLasso(X=x,iterations=100,burnIn=100)
# Generate true covariance matrix: s<-.9**toeplitz(0:9) # Generate multivariate normal distribution: set.seed(5) x<-MASS::mvrnorm(n=100,mu=rep(0,10),Sigma=s) blockGLasso(X=x) # Same example with short MCMC chain: s<-.9**toeplitz(0:9) set.seed(6) x<-MASS::mvrnorm(n=100,mu=rep(0,10),Sigma=s) blockGLasso(X=x,iterations=100,burnIn=100)