# NOT RUN {
# data
Y <- GGMncv::Sachs[,1:5]
n <- nrow(Y)
p <- ncol(Y)
# fit model
# note: fix lambda, as in the reference
fit <- ggmncv(cor(Y), n = nrow(Y),
progress = FALSE,
penalty = "lasso",
lambda = sqrt(log(p)/n))
# fit model
# note: no regularization
fit_non_reg <- ggmncv(cor(Y), n = nrow(Y),
progress = FALSE,
penalty = "lasso",
lambda = 0)
# remove (some) bias and sparsity
That <- desparsify(fit)
# graphical lasso estimator
fit$P
# de-sparsified estimator
That$P
# mle
fit_non_reg$P
# }
Run the code above in your browser using DataLab