EGA.estimate {EGAnet}  R Documentation 
EGA
Estimates the number of dimensions of a given dataset or correlation matrix
using the graphical lasso (EBICglasso.qgraph
) or the
Triangulated Maximally Filtered Graph (TMFG
)
network estimation methods.
EGA.estimate(
data,
n = NULL,
model = c("glasso", "TMFG"),
model.args = list(),
algorithm = c("walktrap", "louvain"),
algorithm.args = list(),
corr = c("cor_auto", "pearson", "spearman"),
verbose = TRUE,
...
)
data 
Matrix or data frame.
Variables (down columns) or correlation matrix.
If the input is a correlation matrix,
then argument 
n 
Integer.
Sample size if 
model 
Character. A string indicating the method to use. Current options are:

model.args 
List.
A list of additional arguments for 
algorithm 
A string indicating the algorithm to use or a function from

algorithm.args 
List.
A list of additional arguments for 
corr 
Type of correlation matrix to compute. The default uses

verbose 
Boolean.
Should network estimation parameters be printed?
Defaults to 
... 
Additional arguments.
Used for deprecated arguments from previous versions of 
Two community detection algorithms, Walktrap (Pons & Latapy, 2006) and
Louvain (Blondel et al., 2008), are preprogrammed because of their
superior performance in simulation studies on psychological
data generated from factor models (Christensen & Golino; 2020; Golino et al., 2020).
Notably, any community detection algorithm from the igraph
can be used to estimate the number of communities (see examples).
Returns a list containing:
estimated.network 
A symmetric network estimated using either the

wc 
A vector representing the community (dimension) membership
of each node in the network. 
n.dim 
A scalar of how many total dimensions were identified in the network 
cor.data 
The zeroorder correlation matrix 
Alexander P. Christensen <alexpaulchristensen at gmail.com> and Hudson Golino <hfg9s at virginia.edu>
# Louvain algorithm
Blondel, V. D., Guillaume, J.L., Lambiotte, R., & Lefebvre, E. (2008).
Fast unfolding of communities in large networks.
Journal of Statistical Mechanics: Theory and Experiment, 2008, P10008.
# Compared all igraph community detections algorithms, introduced Louvain algorithm, simulation with continuous and polytomous data
Christensen, A. P., & Golino, H. (under review).
Estimating factors with psychometric networks: A Monte Carlo simulation comparing community detection algorithms.
PsyArXiv.
# Original simulation and implementation of EGA
Golino, H. F., & Epskamp, S. (2017).
Exploratory graph analysis: A new approach for estimating the number of dimensions in psychological research.
PLoS ONE, 12, e0174035.
Golino, H. F., & Demetriou, A. (2017). Estimating the dimensionality of intelligence like data using Exploratory Graph Analysis. Intelligence, 62, 5470.
# Current implementation of EGA, introduced unidimensional checks, continuous and dichotomous data
Golino, H., Shi, D., Christensen, A. P., Garrido, L. E., Nieto, M. D., Sadana, R., & Thiyagarajan, J. A. (2020).
Investigating the performance of Exploratory Graph Analysis and traditional techniques to identify the number of latent factors: A simulation and tutorial.
Psychological Methods, 25, 292320.
# Walktrap algorithm
Pons, P., & Latapy, M. (2006).
Computing communities in large networks using random walks.
Journal of Graph Algorithms and Applications, 10, 191218.
bootEGA
to investigate the stability of EGA's estimation via bootstrap
and CFA
to verify the fit of the structure suggested by EGA using confirmatory factor analysis.
# Estimate EGA
ega.wmt < EGA.estimate(data = wmt2[,7:24], model = "glasso")
# Estimate EGAtmfg
ega.wmt < EGA.estimate(data = wmt2[,7:24], model = "TMFG")
# Estimate EGA with Spinglass
ega.wmt < EGA.estimate(data = wmt2[,7:24], model = "glasso",
algorithm = igraph::cluster_spinglass)