| run_mplus_besem_invariance | R Documentation |
Creates complete Mplus .inp files for every level fitted in
inv (configural, weak, strong, strict and, when
esem_invariance() was run with through, latent var/cov and
latent means), runs them via MplusAutomation, then prints a
side-by-side comparison of fit statistics against the R results from
esem_invariance.
run_mplus_besem_invariance(
inv,
output_folder,
mplus_command = "mplus",
group_labels = NULL,
missing_code = -999,
difftest = TRUE
)
inv |
An |
output_folder |
Character. Folder where |
mplus_command |
Character. Full path to the Mplus executable.
Default |
group_labels |
Named character vector mapping group values to Mplus
labels, e.g. |
missing_code |
Numeric. Missing value sentinel written to the data
file. Default |
difftest |
Logical. Generate |
A data frame (invisibly) with _R, _Mplus, and
delta_ columns for each fit statistic. Printed as a table.
esem_invariance
## Not run:
# Requires a licensed Mplus installation reachable via `mplus_command`.
inv <- esem_invariance(spec, model = "besem")
cmp <- run_mplus_besem_invariance(
inv,
output_folder = tempfile("mplus_inv_"),
mplus_command = "C:/Program Files/Mplus/mplus.exe",
group_labels = c("1" = "MALE", "2" = "FEMALE")
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.