View source: R/estimate_cbsem.R
estimate_cfa | R Documentation |
Estimates a Confirmatory Factor Analysis (CFA) model
estimate_cfa(data, measurement_model = NULL, item_associations=NULL,
model = NULL, lavaan_model = NULL, estimator="MLR", ...)
data |
A The entire CBSEM model can be specified in one of three ways: The pair of measurement and structural models, along associated items, can optionally be specified as separate model components |
measurement_model |
An optional |
item_associations |
An item-to-item matrix representing error
covariances that are freed for estimation.
This matrix is created by The combination of measurement and structural models and inter-item associations can also be specified as a single |
model |
An optional The entire model can also be specified in Lavaan syntax (this overrides any other specifications) |
lavaan_model |
Optionally, a single character string containing the relevant model specification in Any further optional parameters to alter the estimation method: |
estimator |
A character string indicating which estimation method to use in Lavaan. It defaults to "MLR" for robust estimation. See the Lavaan documentation for other supported estimators. |
... |
Any other parameters to pass to |
A list of the estimated parameters for the CFA model including:
data |
A matrix of the data upon which the model was estimated. |
measurement_model |
The SEMinR measurement model specification. |
construct scores |
A matrix of the estimated construct scores for the CB-SEM model. |
item_weights |
A matrix of the estimated CFA item weights. |
lavaan_model |
The lavaan model syntax equivalent of the SEMinR model. |
lavaan_output |
The raw lavaan output generated after model estimation. |
Jöreskog, K.G. (1969) A general approach to confirmatory maximum likelihood factor analysis. Psychometrika, 34, 183-202.
constructs
reflective
associations
item_errors
as.reflective
#' @examples mobi <- mobi
#seminr syntax for creating measurement model mobi_mm <- constructs( reflective("Image", multi_items("IMAG", 1:5)), reflective("Expectation", multi_items("CUEX", 1:3)), reflective("Quality", multi_items("PERQ", 1:7)) )
#seminr syntax for freeing up item-item covariances mobi_am <- associations( item_errors(c("PERQ1", "PERQ2"), "CUEX3"), item_errors("IMAG1", "CUEX2") )
mobi_cfa <- estimate_cfa(mobi, mobi_mm, mobi_am)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.