Arguments
- ega.obj
- data
Matrix or data frame. Should consist only of variables to be used in the analysis
- estimator
The estimator used in the confirmatory factor analysis. 'WLSMV' is the estimator of choice for ordinal variables. 'ML' or 'WLS' for interval variables. See
lavOptions
for more details- plot.CFA
Logical. Should the CFA structure with its standardized loadings be plot? Defaults to TRUE
- layout
Layout of plot (see
semPaths
). Defaults to "spring"- ...
Arguments passed to
cfa
Value
Returns a list containing:
- fit
Output from
cfa
- summary
Summary output from
lavaan-class
- fit.measures
Fit measures: chi-squared, degrees of freedom, p-value, CFI, RMSEA, GFI, and NFI. Additional fit measures can be applied using the
fitMeasures
function (see examples)
References
Demonstrative use
Christensen, A. P., Gross, G. M., Golino, H., Silvia, P. J., & Kwapil, T. R. (2019).
Exploratory graph analysis of the Multidimensional Schizotypy Scale.
Schizophrenia Research, 206, 43-51.
Initial implementation
Golino, H., & Epskamp, S. (2017).
Exploratory graph analysis: A new approach for estimating the number of dimensions in psychological research.
PLoS ONE, 12, e0174035.
Examples
# Load data
wmt <- wmt2[,7:24]
if (FALSE) { # \dontrun{
# Estimate EGA
ega.wmt <- EGA(
data = wmt,
plot.EGA = FALSE # No plot for CRAN checks
)
# Fit CFA model to EGA results
cfa.wmt <- CFA(
ega.obj = ega.wmt, estimator = "WLSMV",
plot.CFA = FALSE, # No plot for CRAN checks
data = wmt
)
# Additional fit measures
lavaan::fitMeasures(cfa.wmt$fit, fit.measures = "all")} # }