View source: R/umxMeasurementInvariance.R
| umxMeasurementInvariance | R Documentation |
umxMeasurementInvariance runs a sequence of multi-group CFA models
to test for configural, weak (metric), strong (scalar), and strict invariance
across groups.
umxMeasurementInvariance(
model,
data = NULL,
group = NULL,
type = "all",
compare = c("both", "sequential", "configural"),
silent = FALSE,
...
)
model |
A lavaan syntax string defining the CFA model. |
data |
A data frame containing the data. |
group |
Character string, the name of the grouping variable. |
type |
Character vector, which tests to run. Default is "all", which runs configural, weak, strong, and strict models. |
compare |
Character string, how to compare the models: "both", "sequential", or "configural". Default is "both". |
silent |
Boolean, whether to suppress output and messages. Default is FALSE. |
... |
Additional arguments passed to |
A model comparison table (data frame). If compare is "both" (default) or "sequential", the sequential comparison table is returned, and the configural/baseline comparison table is attached as the configural attribute. If compare is "configural", the baseline comparison table is returned.
umxRAM(), umxCompare()
## Not run:
data("HS.ability.data", package = "OpenMx")
df = umx_scale(HS.ability.data[, c("visual", "cubes", "flags", "school")])
model = "spatial =~ visual + cubes + flags"
umxMeasurementInvariance(model, data = df, group = "school")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.