| save_results | R Documentation |
Writes all standard output files to output_folder:
<label>_fit_indices.csv – CFI/TLI/RMSEA/SRMR for all models.
<label>_CFA_loadings.csv – standardised loading matrix (wide).
<label>_ESEM_loadings.csv – standardised loading matrix (wide).
<label>_BESEM_loadings.csv – standardised loading matrix (wide).
<label>_loadings_comparison.csv – R vs Mplus loadings, long
format with SEs, z-scores, p-values, and diff_std.
<label>_omega.csv – Reliability indices (if
indices is supplied).
<label>_results.xlsx – Single xlsx workbook with all results
(when xlsx = TRUE).
save_results(results, omega = NULL, output_folder, label = NULL, xlsx = FALSE)
results |
An |
omega |
Optional. A |
output_folder |
Character. Path to the folder where files are written. Created if it does not exist. |
label |
Character. Prefix for output file names. Defaults to
|
xlsx |
Logical. If |
Invisibly returns a character vector of file paths written.
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)
indices <- compute_indices(results)
save_results(results, indices,
output_folder = file.path(tempdir(), "esem_results"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.