efast | R Documentation |
This function estimates efa models with residual covariance.
efast(
data,
M,
rstruct,
sample.nobs = NULL,
auto.fix.first = FALSE,
auto.var = TRUE,
auto.efa = TRUE,
information = "observed",
std.ov = TRUE,
...
)
data |
<data.frame> the dataset or <matrix> covariance matrix |
M |
<numeric> How many factors, minimum 2 |
rstruct |
<list> residual structure (see details) |
sample.nobs |
<numeric> sample size (if data = covmat, see lavaan) |
auto.fix.first |
<bool> see lavaan |
auto.var |
<bool> see lavaan |
auto.efa |
<bool> see lavaan |
information |
<character> see lavaan |
std.ov |
<bool> see lavaan |
... |
other arguments passed to lavaan |
Residual structure (in the form of residual covariances) can be added to the EFA through a list of pairs of variable names. See the example for more information.
## Not run:
# Use a lavaan test dataset
test_data <- lavaan::HolzingerSwineford1939[,7:15]
# create an EFA model
test_efa <- efast(test_data, 3)
# create a (simple) residual structure
res_struct <- list(
c("x4", "x7"),
c("x5", "x9")
)
# create an efast model
test_efast <- efast(test_data, 3, res_struct)
compare the models
lavaan::lavTestLRT(test_efa, test_efast)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.