View source: R/convert_efa_to_cfa.R
convert_efa_to_cfa | R Documentation |
Enables a conversion between Exploratory Factor Analysis (EFA) and
Confirmatory Factor Analysis (CFA) lavaan
-ready structure.
convert_efa_to_cfa(model, ...)
## S3 method for class 'fa'
convert_efa_to_cfa(
model,
threshold = "max",
names = NULL,
max_per_dimension = NULL,
...
)
efa_to_cfa(model, ...)
model |
An EFA model (e.g., a |
... |
Arguments passed to or from other methods. |
threshold |
A value between 0 and 1 indicates which (absolute) values
from the loadings should be removed. An integer higher than 1 indicates the
n strongest loadings to retain. Can also be |
names |
Vector containing dimension names. |
max_per_dimension |
Maximum number of variables to keep per dimension. |
Converted index.
library(parameters)
data(attitude)
efa <- psych::fa(attitude, nfactors = 3)
model1 <- efa_to_cfa(efa)
model2 <- efa_to_cfa(efa, threshold = 0.3)
model3 <- efa_to_cfa(efa, max_per_dimension = 2)
suppressWarnings(anova(
lavaan::cfa(model1, data = attitude),
lavaan::cfa(model2, data = attitude),
lavaan::cfa(model3, data = attitude)
))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.