EGA
Estimates the number of dimensions of a given dataset/instrument
using graphical lasso (EBICglasso.qgraph
) or the
Triangulated Maximally Filtered Graph (TMFG
)
method and the walktrap community detection algorithm (cluster_walktrap
).
The glasso regularization parameter is set via EBIC.
EGA.estimate(
data,
n = NULL,
model = c("glasso", "TMFG"),
algorithm = c("walktrap", "louvain"),
steps = 4,
cor = c("cor_auto", "pearson", "spearman"),
...
)
A dataframe with the variables to be used in the analysis or a correlation matrix.
If the data used is a correlation matrix, the argument n
will need to be specified.
Integer. Sample size, if the data provided is a correlation matrix
A string indicating the method to use. Current options are:
glasso
Estimates the Gaussian graphical model using graphical LASSO with
extended Bayesian information criterion to select optimal regularization parameter.
This is the default method
TMFG
Estimates a Triangulated Maximally Filtered Graph
A string indicating the algorithm to use. Current options are:
walktrap
Computes the Walktrap algorithm using cluster_walktrap
louvain
Computes the Walktrap algorithm using cluster_louvain
Number of steps to be used in cluster_walktrap
algorithm.
Defaults to 4.
Type of correlation matrix to compute. The default uses cor_auto
.
Current options are:
cor_auto
Computes the correlation matrix using the cor_auto
function from
qgraph
.
pearson
Computes Pearson's correlation coefficient using the pairwise complete observations via
the cor
function.
spearman
Computes Spearman's correlation coefficient using the pairwise complete observations via
the cor
function.
Additional arguments to be passed to EBICglasso.qgraph
or TMFG
Returns a list containing:
A symmetric network estimated using either the
EBICglasso.qgraph
or TMFG
A vector representing the community (dimension) membership
of each node in the network. NA
values mean that the node
was disconnected from the network
A scalar of how many total dimensions were identified in the network
The zero-order correlation matrix
Golino, H. F., & Epskamp, S. (2017). Exploratory graph analysis: A new approach for estimating the number of dimensions in psychological research. PloS one, 12(6), e0174035.. doi: journal.pone.0174035
Golino, H. F., & Demetriou, A. (2017). Estimating the dimensionality of intelligence like data using Exploratory Graph Analysis. Intelligence, 62, 54-70. doi: j.intell.2017.02.007
Golino, H., Shi, D., Christensen, A. P., Garrido, L. E., Nieto, M. D., Sadana, R., & Thiyagarajan, J. A. (in press). Investigating the performance of Exploratory Graph Analysis and traditional techniques to identify the number of latent factors: A simulation and tutorial. Psychological Methods. doi: 10.31234/osf.io/gzcre
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.
# NOT RUN {
# }
# NOT RUN {
#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
ega.intel <- EGA.estimate(data = intelligenceBattery[,8:66], model = "glasso")
# }
Run the code above in your browser using DataLab