ebic {cglasso} | R Documentation |
‘ebic
’ function computes the extended Bayesian Information Criterion.
ebic(object, g) ## S3 method for class 'glasso' ebic(object, g = 0.5) ## S3 method for class 'mglasso' ebic(object, g = 0.5) ## S3 method for class 'cglasso' ebic(object, g = 0.5)
object |
a fitted model object. |
g |
the parameter indexing the extended BIC: a value belonging to the interval [0, 1]. Default is |
The measure of goodness-of-fit (gof) returned by the function ‘ebic
’ depends on the class of the fitted model.
If ‘object
’ has class ‘glasso
’ or ‘ggm
’, then ‘ebic
’ computes the extended Bayesian Information Criterion (eBIC) proposed in Foygel and others (2010):
eBIC = -2*log-likelihood + a(rho)*(log(n) + 4*g*log(p)),
where a(rho) denotes the number of non-zero off-diagonal elements in hat{Tht}^rho and g is a value belonging to the interval [0, 1] indexing the measure of goodness-of-fit. As explained in Foygel and others (2010), the log-likelihood function is evaluated using the maximum likelihood estimates of the model select by glasso. For this reason, ‘ebic
’ calls the generic function mle
to fit the Gaussian graphical model (GGM) selected by glasso
.
For the remaining models, eBIC is defined as:
eBIC = -2*Q-function + a(rho)*(log(n) + 4*g*log(p)),
where the Q-function is evaluated at the M-step of the EM-like algorithm describted in mle
.
‘ebic
’ returns an object with S3 class ‘gof
’ for which are available the method functions ‘print.gof
’ and ‘plot.gof
’. These method functions are developed with the aim of helping the user in finding the optimal value of the tuning parameter, defined as the rho-value minimizing the eBIC meaure. For this reason, ‘print.gof
’ shows also the ranking of the fitted models (the best model is pointed out with an arrow) whereas ‘plot.gof
’ points out the optimal rho-value by a vertical dashed line (see below for some examples).
‘ebic
’ returns an object with S3 class “gof
”, i.e. a list containing the following components:
value_gof |
the values of the measure of goodness-of-fit used to evaluate the fitted models. |
rho |
the values of the tuning parameter used to fit the models. |
value |
the values of the log-likelihood or Q-function. |
df |
the number of the estimated non-zero parameters, i.e. the number of non-zero partial correlations plus 2p. |
n |
the sample size. |
p |
the number of variables. |
model |
the name of the fitted model. |
type |
the measure of goodness-of-fit used to evaluate the fitted models. |
Luigi Augugliaro (luigi.augugliaro@unipa.it)
Foygel, R. and Drton, M. (2010). Extended Bayesian Information Criteria for Gaussian Graphical Models. In: Lafferty, J., Williams, C., Shawe-taylor, J., Zemel, R.s. and Culott, A. (editors), Advances in Neural Information Processing Systems 23. pp. 604–612.
loglik
, cglasso
, mglasso
, glasso
, mle
, aic
, bic
and the method funtions plot
and summary
.
library("cglasso") set.seed(123) ################# # cglasso model # ################# n <- 100L p <- 5L mu <- rep.int(0L, times = p) X <- rdatacggm(n = n, mu = mu, probr = 0.05) out <- cglasso(X = X) out_ebic <- ebic(out) out_ebic plot(out_ebic) ############## # cggm model # ############## out_mle <- mle(out) out_ebic <- ebic(out_mle) out_ebic plot(out_ebic) ################# # mglasso model # ################# X <- rnorm(n * p) id.na <- sample.int(n = n * p, size = n * p * 0.05) X[id.na] <- NA dim(X) <- c(n, p) out <- mglasso(X = X) out_ebic <- ebic(out) out_ebic plot(out_ebic) ############## # mggm model # ############## out_mle <- mle(out) out_ebic <- ebic(out_mle) out_ebic plot(out_ebic) ################# # glasso model # ################# X <- rnorm(n * p) dim(X) <- c(n, p) out <- glasso(X) out_ebic <- ebic(out) out_ebic plot(out_ebic) ############# # ggm model # ############# out_mle <- mle(out) out_ebic <- ebic(out_mle) out_ebic plot(out_ebic)