A basic function to estimate EGA
for multidimensional structures.
This function does not include the unidimensional check and it does not
plot the results. This function can be used as a streamlined approach
for quick EGA
estimation when unidimensionality or visualization
is not a priority
Arguments
- data
Matrix or data frame. Should consist only of variables to be used in the analysis
- n
Numeric (length = 1). Sample size 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
- model
Character (length = 1). Defaults to
"glasso"
. Available options:"BGGM"
— Computes the Bayesian Gaussian Graphical Model. Set argumentordinal.categories
to determine levels allowed for a variable to be considered ordinal. See?BGGM::estimate
for more details"glasso"
— Computes the GLASSO with EBIC model selection. SeeEBICglasso.qgraph
for more details"TMFG"
— Computes the TMFG method. SeeTMFG
for more details
- algorithm
Character or
igraph
cluster_*
function (length = 1). Defaults to"walktrap"
. Three options are listed below but all are available (seecommunity.detection
for other options):"leiden"
— Seecluster_leiden
for more details"louvain"
— By default,"louvain"
will implement the Louvain algorithm using the consensus clustering method (seecommunity.consensus
for more information). This function will implementconsensus.method = "most_common"
andconsensus.iter = 1000
unless specified otherwise"walktrap"
— Seecluster_walktrap
for more details
- 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
,network.estimation
,community.detection
, andcommunity.consensus
Value
Returns a list containing:
- network
A matrix containing a network estimated using
link[EGAnet]{network.estimation}
- wc
A vector representing the community (dimension) membership of each node in the network.
NA
values mean that the node was disconnected from the network- n.dim
A scalar of how many total dimensions were identified in the network
- cor.data
The zero-order correlation matrix
- n
Number of cases in
data
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.
Introduced unidimensional checks, simulation with 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, 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
Author
Alexander P. Christensen <alexpaulchristensen at gmail.com> and Hudson Golino <hfg9s at virginia.edu>
Examples
# Obtain data
wmt <- wmt2[,7:24]
# Estimate EGA
ega.wmt <- EGA.estimate(data = wmt)
# Estimate EGA with TMFG
ega.wmt.tmfg <- EGA.estimate(data = wmt, model = "TMFG")
# Estimate EGA with an {igraph} function (Fast-greedy)
ega.wmt.greedy <- EGA.estimate(
data = wmt,
algorithm = igraph::cluster_fast_greedy
)