View source: R/Syntax-Functions.R
efa_cfa_syntax | R Documentation |
Uses the factor loadings matrix, presumably from an exploratory factor analysis, to generate lavaan
compatible confirmatory factory analysis syntax.
efa_cfa_syntax(
loadings,
simple = TRUE,
min.loading = NA,
single.item = c("keep", "drop", "none"),
identified = TRUE,
constrain0 = FALSE
)
loadings |
matrix of factor loadings |
simple |
logical; Should the perfect simple structure be returned (default) when converting EFA results to CFA syntax?
If |
min.loading |
numeric between 0 and 1 indicating the minimum (absolute) value of the loading for a variable on a factor
when converting EFA results to CFA syntax. Must be specified when |
single.item |
character indicating how single-item factors should be treated.
Use |
identified |
logical; Should identification check for rotational uniqueness a la Millsap (2001) be performed?
If the model is not identified |
constrain0 |
logical; Should variable(s) with all loadings below |
Millsap, R. E. (2001). When trivial constraints are not trivial: The choice of uniqueness constraints in confirmatory factor analysis. *Structural Equation Modeling, 8*(1), 1-17. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1207/S15328007SEM0801_1")}
loadings <- matrix(c(rep(.2, 3), rep(.6, 3), rep(.8, 3), rep(.3, 3)), ncol = 2)
# simple structure
efa_cfa_syntax(loadings)
# allow cross-loadings and check if model is identified
efa_cfa_syntax(loadings, simple = FALSE, min.loading = .25)
# allow cross-loadings and ignore identification check
efa_cfa_syntax(loadings, simple = FALSE, min.loading = .25, identified = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.