Displaying 1 result from an estimated 1 matches for "critfun".
2011 Oct 19
1
Sparse covariance estimation (via glasso) shrinking to a "nonzero" constant
...thr, maxit = maxit, ww = ww, xx = xx, niter = integer(1),
del = double(1), ierr = integer(1), PACKAGE = "glasso")
ww = matrix(junk$ww, ncol = n)
xx = matrix(junk$xx, ncol = n)
if (junk$ierr != 0) {
stop("memory allocation error")
}
critfun = function(Sigmahati, s, rho, penalize.diagonal = TRUE) {
d = det(Sigmahati)
temp = Sigmahati
if (!penalize.diagonal) {
diag(temp) = 0
}
val = -log(d) + sum(diag(s %*% Sigmahati)) + sum(abs(rho *
temp))
return(val)...