Learn R Programming

cglasso (version 1.1.2)

summary: Summary Method

Description

summary’ produces a summary of the sequence of fitted models.

Usage

# S3 method for glasso
summary(object, …, gof = c("BIC", "AIC", "eBIC"), par.gof, digits = 4L)

Arguments

object

an object of class ‘glasso’, ‘ggm’, ‘cglasso’ or ‘cggm’.

gof

string specifying the measure of goodness-of-fit used to evaluate the fitted models. Default is ‘BIC’.

par.gof

the parameter of the measure of goodness-of-fit used to evaluate the fitted models.

digits

the minimum number of significant digits to be used: see ‘print.default’.

further arguments passed to the method function ‘print.data.frame’.

Value

The function ‘summary.glasso’ computes and returns a list of summary statistics with the following elements:

table

a data.frame containing the summary statistics used to evaluate the sequence of fitted models.

which.min

the number of the model with the lowest measure of goodness-of-fit.

Details

The method function summary.glasso gives information about the sequence of fitted models. The output is divided in two sections.

First section shows the call that produced object followed by a data.frame reporting the values of the tuning parameter used to fit the model (rho), the number of non-zero estimates (df), the values of the pseudo R-squared (R2) describted in glasso, mglasso and cglasso, the values of the measure of goodness-of-fit used to evaluate the fitted models and the ranking of the fitted models (Rank). The model with the lowest measure of goodness-of-fit is pointed out by an arrow.

Second section shows the details of the selected model plus the number of connected components and the number of vertices per component.

See Also

link{glasso}, mglasso, cglasso, mle, aic bic and ebic.

Examples

Run this code
# NOT RUN {
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)
summary(out, gof = "AIC")
summary(out, gof = "BIC")
summary(out, gof = "eBIC")

##############
# cggm model #
##############
out_mle <- mle(out)
summary(out_mle, gof = "AIC")
summary(out_mle, gof = "BIC")
summary(out_mle, gof = "eBIC")

#################
# cglasso model #
#################
R <- event(X)
X <- as.matrix(X)
X[R == 1L] <- NA
out <- mglasso(X = X)
summary(out, gof = "AIC")
summary(out, gof = "BIC")
summary(out, gof = "eBIC")

##############
# mggm model #
##############
out_mle <- mle(out)
summary(out_mle, gof = "AIC")
summary(out_mle, gof = "BIC")
summary(out_mle, gof = "eBIC")

#################
# glasso model #
#################
X <- MASS::mvrnorm(n = n, mu = mu, Sigma = diag(p))
out <- glasso(X)
summary(out, gof = "AIC")
summary(out, gof = "BIC")
summary(out, gof = "eBIC")

#############
# ggm model #
#############
out_mle <- mle(out)
summary(out_mle, gof = "AIC")
summary(out_mle, gof = "BIC")
summary(out_mle, gof = "eBIC")
# }

Run the code above in your browser using DataLab