Implements an adaptive graphical lasso method for sparse precision matrix and network estimation. The method combines ridge stabilization, cross-validated regularization, an initial graphical lasso estimate, and adaptive edge-specific penalties to estimate sparse conditional dependence structures. The method supports settings where the sample size is smaller than, equal to, or larger than the number of variables.
AdaptiveGlasso is an R package implementing an adaptive graphical lasso approach for sparse precision-matrix and network estimation.
The method combines ridge stabilization, data-driven selection of the regularization parameter, an initial graphical lasso estimate, and adaptive edge-specific penalties. It was developed for settings in which stable network estimation may be difficult because the number of variables is large relative to the available sample size, while remaining applicable when the sample size is equal to or larger than the number of variables.
The package provides a single user-facing fitting function, adaptive_glasso(), together with methods for inspecting fitted models and extracting the estimated precision, covariance, adjacency, adaptive-weight, and penalty matrices.
Estimating sparse conditional-dependence networks can be difficult in high-dimensional and small-sample settings, particularly when the number of variables approaches or exceeds the number of observations.
The standard graphical lasso estimates a sparse precision matrix using a common regularization structure. Adaptive penalization allows the amount of shrinkage to vary across potential edges according to an initial estimate of the precision matrix.
AdaptiveGlasso combines this idea with ridge stabilization of the sample covariance matrix. The approach therefore separates two roles:
This structure is especially useful for sparse network estimation under challenging (n<p) conditions, but the method is not restricted to that setting.
For an (n \times p) data matrix (X), AdaptiveGlasso proceeds through the following steps.
By default, variables are standardized before model fitting.
The sample covariance matrix (S) is stabilized as
$$ S_{\delta} = S + \delta I, $$
where (\delta) is controlled by the ridge argument.
The default is
ridge = 0.10
The regularization parameter (\lambda) can be handled in two ways:
lambda = NULL — select (\lambda) automatically by cross-validation using CVglasso;lambda = a positive numeric value — use the supplied value directly and skip cross-validation.An initial graphical lasso model is fitted to the ridge-stabilized covariance matrix to obtain an initial precision-matrix estimate,
$$ \widehat{\Omega}^{,\mathrm{init}}. $$
The edge-specific adaptive weights are
\frac{1} { \left| \widehat{\omega}^{,\mathrm{init}}_{ij} \right| + d }, $$
where (d>0) is a stabilization constant.
The default is
d = 0.32
The final edge-specific penalties are
\lambda w_{ij}. $$
A second graphical lasso model is fitted using the adaptive penalty matrix to obtain the final precision-matrix estimate.
The resulting fitted object contains the final precision and covariance matrices together with the quantities used throughout the adaptive fitting procedure.
AdaptiveGlasso is currently available from GitHub and is being prepared for CRAN submission.
The package can be installed from GitHub using remotes:
if (!requireNamespace("remotes", quietly = TRUE)) {
install.packages("remotes")
}
remotes::install_github("elizabethamona/AdaptiveGlasso")
After installation:
library(AdaptiveGlasso)
The primary user-facing function is:
adaptive_glasso()
The function accepts a numeric matrix or data frame with:
For illustration:
library(AdaptiveGlasso)
set.seed(123)
x <- matrix(
rnorm(60 * 6),
nrow = 60,
ncol = 6
)
The default behavior is to select the regularization parameter automatically.
fit_cv <- adaptive_glasso(
x = x,
ridge = 0.10,
d = 0.32,
lambda = NULL
)
Because lambda = NULL, cross-validation is performed using CVglasso.
The selected value can be inspected using:
fit_cv$lambda
and the fitted model can be printed directly:
fit_cv
Users may instead supply a positive numeric value for lambda.
For example:
fit_fixed <- adaptive_glasso(
x = x,
ridge = 0.10,
d = 0.32,
lambda = 0.195237
)
When a numeric value is supplied, that value is used directly and cross-validation is not performed.
Thus:
lambda = NULL
means select lambda by cross-validation, whereas
lambda = 0.195237
means use the supplied fixed value.
The principal defaults are:
| Argument | Default | Purpose |
|---|---|---|
ridge |
0.10 |
Ridge stabilization added to the covariance diagonal |
d |
0.32 |
Stabilization constant used in the adaptive weights |
lambda |
NULL |
Select lambda by cross-validation |
lam.min.ratio |
0.01 |
Minimum-to-maximum lambda ratio used by CVglasso |
nfolds |
5 |
Number of cross-validation folds |
standardize |
TRUE |
Standardize variables before fitting |
seed |
123 |
Seed used for reproducible cross-validation |
penalize_diagonal |
TRUE |
Penalize diagonal elements in the graphical lasso fitting steps |
tol |
1e-4 |
Graphical lasso convergence tolerance |
maxit |
10000 |
Maximum number of graphical lasso iterations |
During automatic lambda selection, CVglasso uses its unpenalized-diagonal cross-validation formulation. The initial and final graphical lasso fits then use the value supplied through penalize_diagonal, which defaults to TRUE.
The input supplied to adaptive_glasso() must be a numeric matrix or data frame.
The package requires:
standardize = TRUE.If column names are not supplied, AdaptiveGlasso automatically creates variable names of the form:
V1, V2, V3, ...
By default:
standardize = TRUE
so each variable is centered and scaled before covariance estimation.
AdaptiveGlasso can be fitted when:
$$ n < p, $$
$$ n = p, $$
or
$$ n > p. $$
The method was motivated by high-dimensional network estimation where (n<p), but it is not restricted to that regime.
Automated package tests cover all three sample-size-to-dimension settings.
An adaptive_glasso() fit returns an object of class:
"adaptive_glasso_fit"
Printing the fitted object provides a concise summary:
fit_cv
including:
Additional fitted quantities remain available directly from the object.
For example:
fit_cv$lambda
fit_cv$edge_count
fit_cv$adaptive_weights
fit_cv$adaptive_penalty
fit_cv$precision
fit_cv$covariance
The coef() method provides a convenient interface for extracting the principal fitted matrices.
coef(fit_cv, type = "precision")
coef(fit_cv, type = "adjacency")
coef(fit_cv, type = "weights")
coef(fit_cv, type = "penalty")
coef(fit_cv, type = "covariance")
The adjacency matrix is constructed from the absolute values of the estimated off-diagonal precision-matrix entries, with its diagonal set to zero.
The signed conditional-association information remains available in the estimated precision matrix itself.
When:
lambda = NULL
the fitted object also stores the cross-validation results.
These include:
fit_cv$cv
fit_cv$cv_best_index
fit_cv$cv_mean_error
fit_cv$lambda
When a numeric lambda is supplied directly, cross-validation is skipped.
AdaptiveGlasso estimates the sparse precision matrix and corresponding adjacency structure but does not prescribe a particular downstream network-analysis workflow.
The fitted matrices can be used with appropriate R tools for analyses such as:
Interpretation of individual edges and network statistics should account for the study design, sample size, estimation uncertainty, and scientific context.
The motivating application for AdaptiveGlasso uses a 41-variable mental-health symptom network with a small-sample, high-dimensional structure.
The original participant-level data are not distributed with this package because they are not public data.
For this reason, package documentation and examples use simulated data rather than distributing the motivating dataset.
The implementation has been checked against the motivating analysis to ensure that the package reproduces the intended fitting procedure.
AdaptiveGlasso includes automated tests covering:
The package is also checked using standard R package checking tools before release.
Function-level documentation is available through:
?adaptive_glasso
Package-level documentation is available through:
?AdaptiveGlasso
The fitted-object methods can also be inspected using:
?coef.adaptive_glasso_fit
?print.adaptive_glasso_fit
AdaptiveGlasso accompanies the methodological manuscript:
An Adaptive Graphical Lasso Approach to Modeling Symptom Networks of Common Mental Disorders in Eritrean Refugee Population
The manuscript develops and evaluates the adaptive graphical lasso approach through methodological formulation, simulation studies, sensitivity analyses, and a real-world symptom-network application.
The manuscript is currently being finalized for submission. The complete publication citation will be added here when available.
Elizabeth B. Amona, PhD
Biostatistics Core, Brown Cancer Center
University of Louisville
ORCID: https://orcid.org/0000-0002-7575-788X
AdaptiveGlasso is released under the MIT License.
Copyright © 2026 Elizabeth B. Amona.