General function to apply network estimation methods in EGAnet
Arguments
- data
Matrix or data frame. Should consist only of variables to be used in the analysis
- n
Numeric (length = 1). Sample size if
dataprovided 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.matrixfor more details)"cor_auto"— Usescor_autoto compute correlations. Arguments can be passed along to the function"cosine"— Usescosineto 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
datawith 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
- model
Character (length = 1). Defaults to
"glasso". Available options:"BGGM"— Computes the Bayesian Gaussian Graphical Model. Set argumentordinal.categoriesto determine levels allowed for a variable to be considered ordinal. See?BGGM::estimatefor more details"glasso"— Computes the GLASSO with EBIC model selection. SeeEBICglasso.qgraphfor more details"TMFG"— Computes the TMFG method. SeeTMFGfor more details
- network.only
Boolean (length = 1). Whether the network only should be output. Defaults to
TRUE. Set toFALSEto obtain all output for the network estimation method- verbose
Boolean (length = 1). Whether messages and (insignificant) warnings should be output. Defaults to
FALSE(silent calls). Set toTRUEto see all messages and warnings for every function call- ...
Additional arguments to be passed on to
auto.correlateand the different network estimation methods (seemodelfor model specific details)
References
Graphical Least Absolute Shrinkage and Selection Operator (GLASSO)
Friedman, J., Hastie, T., & Tibshirani, R. (2008).
Sparse inverse covariance estimation with the graphical lasso.
Biostatistics, 9(3), 432–441.
GLASSO with Extended Bayesian Information Criterion (EBICglasso)
Epskamp, S., & Fried, E. I. (2018).
A tutorial on regularized partial correlation networks.
Psychological Methods, 23(4), 617–634.
Bayesian Gaussian Graphical Model (BGGM)
Williams, D. R. (2021).
Bayesian estimation for Gaussian graphical models: Structure learning, predictability, and network comparisons.
Multivariate Behavioral Research, 56(2), 336–352.
Triangulated Maximally Filtered Graph (TMFG)
Massara, G. P., Di Matteo, T., & Aste, T. (2016).
Network filtering for big data: Triangulated maximally filtered graph.
Journal of Complex Networks, 5, 161-178.