
Enables a conversion betwen Exploratory Factor Analysis (EFA) and Confirmatory Factor Analysis (CFA) lavaan
-ready structure.
convert_efa_to_cfa(model, ...)# S3 method for fa
convert_efa_to_cfa(model, threshold = "max", names = NULL,
...)
efa_to_cfa(model, ...)
An EFA model (e.g., a psych::fa
object).
Arguments passed to or from other methods.
A value between 0 and 1 indicates which (absolute) values from the loadings should be removed. Can also be "max", in which case it will only display the maximum loading per veriable (the most simple structure).
Vector containing dimension names.
Converted index.
Converted index.
# NOT RUN {
library(psych)
library(lavaan)
library(parameters)
efa <- psych::fa(attitude, nfactors = 3)
model1 <- efa_to_cfa(efa)
model2 <- efa_to_cfa(efa, threshold = 0.3)
anova(
lavaan::cfa(model1, data = attitude),
lavaan::cfa(model2, data = attitude)
)
# }
Run the code above in your browser using DataLab