Stepwise Gaussian graphical model selection (ggmModSelect)
Source:R/ggmmodselect.R
ggm_modselect.RdSelects a GGM by extended-BIC model search over edge sets generated from the
glasso path, refitting the unregularized maximum-likelihood precision on
each candidate graph, with an optional stepwise add/drop search. Unlike the
graphical lasso, retained edges are not shrunk. Equivalent in purpose to
qgraph::ggmModSelect(), but pure base R and self-certified via
ggm_support_kkt().
Arguments
- data
Numeric data frame or matrix (rows = observations). Optional if
cor_matrixis supplied.- cor_matrix
Optional correlation matrix; if given,
nis required.- n
Sample size (required when
cor_matrixis supplied).- gamma
EBIC hyperparameter. Default
0, matchingqgraph::ggmModSelect(): because the selected graph is refit with the unregularized MLE (no edge shrinkage), the extra EBIC penalty is not needed, so gamma 0 (plain BIC) is the method's intended setting. (The regularized GGMsebic_glasso()andhuge_network()keep gamma 0.5.)- stepwise
If
TRUE(default), refine the best glasso-path graph by a greedy single-edge add/drop search.- nlambda
Number of glasso penalties scanned for candidate graphs.
- lambda_min_ratio
Smallest penalty as a fraction of the largest.
- threshold
Partial correlations with absolute value below this are zeroed. Default 0.
- cor_method
Correlation used when
datais supplied:"pearson"(default),"spearman","kendall", or"auto"(polychoric/polyserial, theqgraph/bootnetdefault for ordinal items). Seecor_auto().- na_method
Missing-data handling when
datais supplied:"pairwise"(default) or"listwise". Seeebic_glasso().- native
Solver switch for generating candidate supports:
TRUE(default) uses the pure-R solver;FALSEdelegates to theglassoFortran package (inSuggests). The reported precision is the unregularized refit either way. Seeebic_glasso().- labels
Optional node labels.