| compare_loadings | R Documentation |
Builds a long-format data frame with STDYX loadings, standard errors,
z-scores, p-values, and R - Mplus differences for every loading
(primary and cross) across CFA, ESEM, and B-ESEM. Mplus columns are
NA when no Mplus results are present in the pipeline object.
compare_loadings(results)
results |
An |
A data frame with columns:
modelCFA, ESEM, or BESEM.
factorFactor name (lowercase).
itemItem name (lowercase).
loading_type"primary" or "cross".
R_std, R_se, R_z, R_pR estimates.
Mplus_std, Mplus_se, Mplus_z, Mplus_pMplus estimates (NA if unavailable).
diff_stdR - Mplus standardised loading difference (NA if unavailable).
data("HolzingerSwineford1939", package = "lavaan")
spec <- specify_model(
Visual = c("x1", "x2", "x3"),
Textual = c("x4", "x5", "x6"),
Speed = c("x7", "x8", "x9"),
data = HolzingerSwineford1939,
label = "Holzinger-Swineford"
)
results <- run_comparison(spec, n_starts = 5L)
lc <- compare_loadings(results)
head(lc)
# Primary loadings only (Mplus_* columns are NA without a Mplus run)
lc[lc$loading_type == "primary", ]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.