R/hglassoBIC.R

Defines functions hglassoBIC

Documented in hglassoBIC

hglassoBIC <- function(x,S,c=0.2){
	
n <- x$n	
v <- length(x$hubind)	
Zcard <- (sum(abs(x$Z)!=0)-x$p)/2
Vcard <- x$V+t(x$V)
diag(Vcard) <- 0
Vcard <- sum(Vcard!=0)/2

return(list(BIC=n*(-log(det(x$Theta))+sum(diag(S%*%x$Theta)))+log(n)*Zcard + log(n)*(v+c*(Vcard-v))))

}

Try the hglasso package in your browser

Any scripts or data that you put into this service are public.

hglasso documentation built on May 13, 2022, 9:06 a.m.