Description Usage Arguments Value Author(s) References Examples
Extended bayesian information criteria for gaussian graphical models
1 | extendedBIC(gamma,omegahat,S,n)
|
gamma |
a tuning parameter taking a scalar in [0,1] and leading to stronger penalization of large graphs |
omegahat |
a p x p matrix indicating an estimates of precision (inverse covariance) matrix |
S |
a p x p matrix indicating sample covariance matrix |
n |
a scalar indicating sample size |
Extended BIC penalized by the size of graphs
Min Jin Ha <mjha@mdanderson.org>
Foygel, R. and Drton, M. (2010). Extended bayesian information criteria for gaussian graphical models. arXiv preprint arXiv:1011.6640 .
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | library(glasso)
data(gbm)
x = gbm[,1]
Y = gbm[,-1]
# Estimating inverse covariance matrix using GLasso #
S = cov(Y)
rhoarray = exp(seq(log(0.001),log(1),length=100))
BIC = rep(0,length(rhoarray))
for (rh in 1:length(rhoarray)) {
fit.gl1 = glasso(S,rho=rhoarray[rh])
BIC[rh] = extendedBIC(gamma=0,omegahat=fit.gl1$wi,S=S,n=nrow(Y))
}
rho = rhoarray[which.min(BIC)]
fit.gl2 = glasso(S,rho=rho)
Omega = fit.gl2$wi
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.