The graphical least absolute shrinkage and selection operator with a non-convex regularization penalties
Usage
network.nonconvex(
data,
n = NULL,
corr = c("auto", "cor_auto", "cosine", "pearson", "spearman"),
na.data = c("pairwise", "listwise"),
penalty = c("iPOT", "LGP", "POP", "SPOT"),
gamma = NULL,
lambda = NULL,
nlambda = 50,
lambda.min.ratio = 0.01,
penalize.diagonal = TRUE,
optimize.over = c("none", "lambda", "both"),
ic = c("AIC", "AICc", "BIC", "EBIC"),
ebic.gamma = 0.5,
fast = TRUE,
verbose = FALSE,
...
)
Arguments
- data
Matrix or data frame. Should consist only of variables to be used in the analysis
- n
Numeric (length = 1). Sample size must be provided if
data
provided is a correlation matrix- corr
Character (length = 1). Method to compute correlations. Defaults to
"auto"
. Available options:"auto"
— Automatically computes appropriate correlations for the data using Pearson's for continuous, polychoric for ordinal, tetrachoric for binary, and polyserial/biserial for ordinal/binary with continuous. To change the number of categories that are considered ordinal, useordinal.categories
(seepolychoric.matrix
for more details)"cor_auto"
— Usescor_auto
to compute correlations. Arguments can be passed along to the function"cosine"
— Usescosine
to compute cosine similarity"pearson"
— Pearson's correlation is computed for all variables regardless of categories"spearman"
— Spearman's rank-order correlation is computed for all variables regardless of categories
For other similarity measures, compute them first and input them into
data
with the sample size (n
)- na.data
Character (length = 1). How should missing data be handled? Defaults to
"pairwise"
. Available options:"pairwise"
— Computes correlation for all available cases between two variables"listwise"
— Computes correlation for all complete cases in the dataset
- penalty
Character (length = 1). Available options:
"iPOT"
— Inverse power of two"LGP"
— Lambda-gamma power"POP"
— Plus one Pareto"SPOT"
— Sigmoid power of two (default)
- gamma
Numeric (length = 1). Adjusts the shape of the penalty. Defaults:
"iPOT"
= 5"LGP"
= 5"POP"
= 4"SPOT"
= 3
- lambda
Numeric (length = 1). Adjusts the initial penalty provided to the non-convex penalty function
- nlambda
Numeric (length = 1). Number of lambda values to test. Defaults to
100
- lambda.min.ratio
Numeric (length = 1). Ratio of lowest lambda value compared to maximal lambda. Defaults to
0.01
- penalize.diagonal
Boolean (length = 1). Should the diagonal be penalized? Defaults to
FALSE
- optimize.over
Character (length = 1). Whether optimization of lambda, gamma, both, or no hyperparamters should be performed. Defaults to
"none"
or no optimization- ic
Character (length = 1). What information criterion should be used for model selection? Available options include:
"AIC"
— Akaike's information criterion: \(-2L + 2E\)"AICc"
— AIC corrected: \(AIC + \frac{2E^2 + 2E}{n - E - 1}\)"BIC"
— Bayesian information criterion: \(-2L + E \cdot \log{(n)}\)"EBIC"
— Extended BIC: \(BIC + 4E \cdot \gamma \cdot \log{(E)}\)
Term definitions:
\(n\) — sample size
\(p\) — number of variables
\(E\) — edges
\(S\) — empirical correlation matrix
\(K\) — estimated inverse covariance matrix (network)
\(L = \frac{n}{2} \cdot \log \text{det} K - \sum_{i=1}^p (SK)_{ii}\)
Defaults to
"BIC"
- ebic.gamma
Numeric (length = 1) Value to set gamma parameter in EBIC (see above). Defaults to
0.50
Only used if
ic = "EBIC"
- fast
Boolean (length = 1). Whether the
glassoFast
version should be used to estimate the GLASSO. Defaults toTRUE
.The fast results may differ by less than floating point of the original GLASSO implemented by
glasso
and should not impact reproducibility much (set toFALSE
if concerned)- verbose
Boolean (length = 1). Whether messages and (insignificant) warnings should be output. Defaults to
FALSE
(silent calls). Set toTRUE
to see all messages and warnings for every function call- ...
Additional arguments to be passed on to
auto.correlate