BayesGlassoBlock {abglasso}R Documentation

Adaptive Bayesian graphical lasso MCMC sampler

Description

A Bayesian adaptive graphical lasso data-augmented block Gibbs sampler. The sampler is adapted from the MATLAB routines used in Wang (2012).

Usage

BayesGlassoBlock(X, burnin = 1000, nmc = 2000)

Arguments

X

Numeric matrix.

burnin

An integer specifying the number of burn-in iterations.

nmc

An integer specifying the number of MCMC samples.

Value

list containing:

Sig

A p by p by nmc array of saved posterior samples of covariance matrices.

Omega

A p by p by nmc array of saved posterior samples of precision matrices.

Lambda

A 1 by nmc vector of saved posterior samples of lambda values.

References

Wang, H. (2012). Bayesian graphical lasso models and efficient posterior computation. Bayesian Analysis, 7(4). doi: 10.1214/12-BA729.

Examples


# Generate true covariance matrix:
p             <- 10
n             <- 50
SigTrue       <- pracma::Toeplitz(c(0.7^rep(1:p-1)))
CTrue         <- pracma::inv(SigTrue)
# Generate expected value vector:
mu            <- rep(0,p)
# Generate multivariate normal distribution:
set.seed(123)
X             <- MASS::mvrnorm(n,mu=mu,Sigma=SigTrue)
abglasso_post <- BayesGlassoBlock(X,burnin = 1000,nmc = 2000)


[Package abglasso version 0.1.1 Index]