| Title: | Adaptive Graphical Lasso for Sparse Network Estimation |
|---|---|
| Description: | 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. |
| Authors: | Elizabeth B. Amona [aut, cre, cph] (ORCID: <https://orcid.org/0000-0002-7575-788X>) |
| Maintainer: | Elizabeth B. Amona <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 1.0.0 |
| Built: | 2026-10-24 11:22:33 UTC |
| Source: | https://github.com/cran/AdaptiveGlasso |
Fits an adaptive graphical lasso model for sparse precision-matrix and network estimation. The procedure combines ridge stabilization, an initial graphical lasso estimate, adaptive edge-specific penalties, and a final weighted graphical lasso estimate.
adaptive_glasso( x, ridge = 0.1, d = 0.32, lambda = NULL, lam.min.ratio = 0.01, nfolds = 5L, standardize = TRUE, seed = 123L, penalize_diagonal = TRUE, tol = 1e-04, maxit = 10000L )adaptive_glasso( x, ridge = 0.1, d = 0.32, lambda = NULL, lam.min.ratio = 0.01, nfolds = 5L, standardize = TRUE, seed = 123L, penalize_diagonal = TRUE, tol = 1e-04, maxit = 10000L )
x |
Numeric matrix or data frame with observations in rows and variables in columns. |
ridge |
Non-negative ridge stabilization constant added to the
diagonal of the sample covariance matrix. Default is |
d |
Positive stabilization constant used in the adaptive weights
|
lambda |
Optional positive regularization parameter. If |
lam.min.ratio |
Minimum-to-maximum lambda ratio used by
|
nfolds |
Number of cross-validation folds used when
|
standardize |
Logical; if |
seed |
Optional integer seed used for reproducibility of
cross-validation when |
penalize_diagonal |
Logical; whether diagonal precision-matrix
elements are penalized. Default is |
tol |
Positive convergence tolerance passed to the graphical
lasso fitting routines. Default is |
maxit |
Maximum number of graphical lasso iterations.
Default is |
The sample covariance matrix is first ridge-stabilized as
where ridge corresponds to .
An initial graphical lasso estimate is then used to construct the adaptive weights
followed by the edge-specific penalties
The value of lambda can be handled in two ways:
lambda = NULL: lambda is selected automatically by
cross-validation using CVglasso.
lambda = a positive numeric value: the supplied value is used
directly and cross-validation is not performed.
The method can be applied when the number of observations is smaller than, equal to, or larger than the number of variables.
An object of class "adaptive_glasso_fit" containing the
fitted precision and covariance matrices, adjacency matrix, initial
precision estimate, adaptive weights, adaptive penalty matrix,
selected or supplied lambda, ridge and adaptive stabilization
constants, cross-validation results when applicable, and fitting
diagnostics.
set.seed(123) x <- matrix( rnorm(60 * 6), nrow = 60, ncol = 6 ) # Use a fixed lambda: cross-validation is not performed fit <- adaptive_glasso( x, lambda = 0.195237 ) fit coef(fit, type = "precision") # Select lambda automatically by cross-validation fit_cv <- adaptive_glasso( x, lambda = NULL, nfolds = 3 ) fit_cv$lambdaset.seed(123) x <- matrix( rnorm(60 * 6), nrow = 60, ncol = 6 ) # Use a fixed lambda: cross-validation is not performed fit <- adaptive_glasso( x, lambda = 0.195237 ) fit coef(fit, type = "precision") # Select lambda automatically by cross-validation fit_cv <- adaptive_glasso( x, lambda = NULL, nfolds = 3 ) fit_cv$lambda
Extract matrices from an adaptive graphical lasso fit
## S3 method for class 'adaptive_glasso_fit' coef( object, type = c("precision", "adjacency", "weights", "penalty", "covariance"), ... )## S3 method for class 'adaptive_glasso_fit' coef( object, type = c("precision", "adjacency", "weights", "penalty", "covariance"), ... )
object |
An object returned by |
type |
Matrix to return. |
... |
Additional arguments; currently unused. |
A matrix.
Print an adaptive graphical lasso fit
## S3 method for class 'adaptive_glasso_fit' print(x, ...)## S3 method for class 'adaptive_glasso_fit' print(x, ...)
x |
An object returned by |
... |
Additional arguments; currently unused. |
The fitted object, invisibly.