runCFA
is a function for performing a one-factor confirmatory factor analysis (CFA) to test unidimensionality.
runCFA(data, estimator = "WLSMV", std.lv = TRUE, scalewise = FALSE, ...)
a PROsetta_data
object. See loadData
for loading a dataset.
the estimator to be used. Passed onto cfa
in 'lavaan' package. (default = WLSMV
)
if TRUE
, the metric of the latent variable is determined by fixing their (residual) variances to 1.0.
If FALSE
, the metric of each latent variable is determined by fixing the factor loading of the first indicator to 1.0.
Passed onto cfa
. (default = TRUE
)
if TRUE
, run analysis for each instrument as well as for the combined instrument.
If FALSE
, run analysis only for the combined instrument. (default = FALSE
)
additional arguments to pass onto cfa
.
runCFA
returns a list containing the CFA results.
# \donttest{
out_cfa <- runCFA(data_asq, scalewise = TRUE)
lavaan::summary(out_cfa$`1` , fit.measures = TRUE, standardized = TRUE, estimates = FALSE)
lavaan::summary(out_cfa$`2` , fit.measures = TRUE, standardized = TRUE, estimates = FALSE)
lavaan::summary(out_cfa$`combined`, fit.measures = TRUE, standardized = TRUE, estimates = FALSE)
# }