EGA {EGAnet} | R Documentation |
Exploratory Graph Analysis
Description
Estimates the number of communities (dimensions) of a dataset or correlation matrix using a network estimation method (Golino & Epskamp, 2017; Golino et al., 2020). After, a community detection algorithm is applied (Christensen et al., 2023) for multidimensional data. A unidimensional check is also applied based on findings from Golino et al. (2020) and Christensen (2023)
Usage
EGA(
data,
n = NULL,
corr = c("auto", "cor_auto", "pearson", "spearman"),
na.data = c("pairwise", "listwise"),
model = c("BGGM", "glasso", "TMFG"),
algorithm = c("leiden", "louvain", "walktrap"),
uni.method = c("expand", "LE", "louvain"),
plot.EGA = TRUE,
verbose = FALSE,
...
)
Arguments
data |
Matrix or data frame. Should consist only of variables to be used in the analysis. Can be raw data or a correlation matrix |
n |
Numeric (length = 1).
Sample size if |
corr |
Character (length = 1).
Method to compute correlations.
Defaults to
For other similarity measures, compute them first and input them
into |
na.data |
Character (length = 1).
How should missing data be handled?
Defaults to
|
model |
Character (length = 1).
Defaults to
|
algorithm |
Character or
|
uni.method |
Character (length = 1).
What unidimensionality method should be used?
Defaults to
|
plot.EGA |
Boolean (length = 1).
Defaults to |
verbose |
Boolean (length = 1).
Whether messages and (insignificant) warnings should be output.
Defaults to |
... |
Additional arguments to be passed on to
|
Value
Returns a list containing:
network |
A matrix containing a network estimated using
|
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 |
correlation |
The zero-order correlation matrix |
n |
Number of cases in |
dim.variables |
An ordered matrix of item allocation |
TEFI |
|
plot.EGA |
Plot output if |
Author(s)
Hudson Golino <hfg9s at virginia.edu>, Alexander P. Christensen <alexpaulchristensen at gmail.com>, Maria Dolores Nieto <acinodam at gmail.com> and Luis E. Garrido <garrido.luiseduardo at gmail.com>
References
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.
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, 292-320.
Compared all igraph community detection algorithms, introduced Louvain algorithm, simulation with continuous and polytomous data
Also implements the Leading Eigenvalue unidimensional method
Christensen, A. P., Garrido, L. E., Pena, K. G., & Golino, H. (2023).
Comparing community detection algorithms in psychological data: A Monte Carlo simulation.
Behavior Research Methods.
Comprehensive unidimensionality simulation
Christensen, A. P. (2023).
Unidimensional community detection: A Monte Carlo simulation, grid search, and comparison.
PsyArXiv.
Compared all igraph
community detection algorithms, simulation with continuous and polytomous data
Christensen, A. P., Garrido, L. E., Guerra-Pena, K., & Golino, H. (2023).
Comparing community detection algorithms in psychometric networks: A Monte Carlo simulation.
Behavior Research Methods.
See Also
plot.EGAnet
for plot usage in EGAnet
Examples
# Obtain data
wmt <- wmt2[,7:24]
# Estimate EGA
ega.wmt <- EGA(
data = wmt,
plot.EGA = FALSE # No plot for CRAN checks
)
# Print results
print(ega.wmt)
# Estimate EGAtmfg
ega.wmt.tmfg <- EGA(
data = wmt, model = "TMFG",
plot.EGA = FALSE # No plot for CRAN checks
)
# Estimate EGA with Louvain algorithm
ega.wmt.louvain <- EGA(
data = wmt, algorithm = "louvain",
plot.EGA = FALSE # No plot for CRAN checks
)
# Estimate EGA with an {igraph} function (Fast-greedy)
ega.wmt.greedy <- EGA(
data = wmt,
algorithm = igraph::cluster_fast_greedy,
plot.EGA = FALSE # No plot for CRAN checks
)