umxMeasurementInvariance: Test measurement invariance of a confirmatory factor analysis...

View source: R/umxMeasurementInvariance.R

umxMeasurementInvarianceR Documentation

Test measurement invariance of a confirmatory factor analysis model

Description

umxMeasurementInvariance runs a sequence of multi-group CFA models to test for configural, weak (metric), strong (scalar), and strict invariance across groups.

Usage

umxMeasurementInvariance(
  model,
  data = NULL,
  group = NULL,
  type = "all",
  compare = c("both", "sequential", "configural"),
  silent = FALSE,
  ...
)

Arguments

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 umxRAM().

Value

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.

See Also

  • umxRAM(), umxCompare()

Examples

## 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)

umx documentation built on Oct. 11, 2026, 5:07 p.m.