View source: R/item.noninvar.R
| item.noninvar | R Documentation |
This function computes the effect size measure dMACS by Nye and Drasgow (2011) and the signed dMACS by Nye et al. (2019) for evaluating the magnitude and the direction of between-group and longitudinal measurement non-invariance or non-equivalence for continuous and ordered categorical items and also computes the expected bias in the mean and variance of the total score.
item.noninvar(data = NULL, ..., object = NULL, model = NULL, group = NULL,
ref = NULL, pooled = TRUE, signed = FALSE, cluster = NULL,
long = FALSE, ordered = FALSE, rescov = NULL, rescov.long = TRUE,
ident = c("marker", "var", "effect"),
estimator = c("ML", "MLM", "MLMV", "MLMVS", "MLF", "MLR",
"GLS", "WLS", "DWLS", "WLSM", "WLSMV",
"ULS", "ULSM", "ULSMV", "DLS", "PML"),
missing = c("listwise", "pairwise", "fiml", "two.stage",
"robust.two.stage", "doubly.robust"),
print = c("all", "summary", "dmacs", "bias"),
digits = 3, as.na = NULL, write = NULL, append = TRUE,
check = TRUE, output = TRUE)
data |
a data frame. If |
... |
an expression indicating the variable names in |
object |
an object of class lavaan, i.e., a fitted latent variable model. Between-group measurement non-invariance is evaluated when specifying a fitted multiple-group model, while longitudinal measurement non-invariance is evaluated when specifying a fitted single-group model with at least two latent variables each representing a factor at different time points. |
model |
a character vector specifying a measurement model with
one factor, or a list of character vectors for specifying
a measurement model with more than one factor for
evaluating between-group measurement non-invariance
when |
group |
either a character string indicating the variable name
of the grouping variable in the data frame specified
in |
ref |
a numeric value or character string indicating the name of the reference group or reference time point. By default, the the first group or time point is used as reference. |
pooled |
logical: if |
signed |
logical: if |
cluster |
either a character string indicating the variable name
of the cluster variable in |
long |
logical: if |
ordered |
logical: if |
rescov |
a character vector or a list of character vectors for
specifying residual covariances, e.g., |
rescov.long |
logical: if |
ident |
a character string indicating the method used for identifying
and scaling latent variables, i.e., |
estimator |
a character string indicating the estimator to be used
(see 'Details' in the help page of the |
missing |
a character string indicating how to deal with missing
data, i.e., |
print |
a character string or character vector indicating which
results to show on the console, i.e. |
digits |
an integer value indicating the number of decimal places to be used for displaying results. |
as.na |
a numeric vector indicating user-defined missing values,
i.e., these values are converted to |
write |
a character string naming a file for writing the output
into either a text file with file extension |
append |
logical: if |
check |
logical: if |
output |
logical: if |
Nye and Drasgow (2011) introduced the effect size measure d_{MACS} (Mean
and Covariance Structure) for evaluating measurement non-invariance at the item
level on a standardized metric similar to Cohen's d (1988) or Glass's (1976)
measures:
d_{MACS}d_{MACS} (Nye & Drasgow,
2011) ranging [0, \infty] is based on the predicted response \hat{X}_{iR}
to an item i for an individual in the reference group (or reference time point)
R and the corresponding response \hat{X}_{iF} for an individual in
the focal group (or focal time point) F:
\hat{X}_{iR} = \tau_{iR} + \lambda_{iR}\xi
\hat{X}_{iF} = \tau_{iF} + \lambda_{iF}\xi
where \tau_{iR} and \tau_{iF} are the interepts, \lambda_{iR}
and \lambda_{iF} are the factor loadings of item i in the reference
and focal group, and \xi is the score on the latent variable.
The effect size evaluating the magnitude of measurement non-invariance is a weighted average difference in predicted responses in standardized metric defined as:
d_{MACS} = \frac{1}{SD_{iP}} \sqrt{\int (\hat{X}_{iR} - \hat{X}_{iF}|\xi)^2 f_F(\xi)d\xi }
where SD_{iP} is the pooled within-group standard deviation of item i
across reference and focal group given by
SD_{iP} = \frac{(N_R - 1)SD_R + (N_F - 1)SD_F}{(N_R - 1) + (N_F - 1)}
Note that f_F(\xi) is the distribution of the latent trait \xi in the focal
group, which is assumed to have a normal distribution with a mean and variance
estimated from the latent factor in the focal group.
d_{MACS\_Signed}d_{MACS\_Signed}
(Nye et al., 2019) ranging [-\infty, \infty] incorporates the unsquared
differences between predicted response to an item i between two groups:
d_{MACS\_Signed} = \frac{1}{SD_{iP}} \int (\hat{X}_{iR} - \hat{X}_{iF}|\xi) f_F(\xi)d\xi
Note that d_{MACS\_Signed} provides complementary information to the unsigned
version by (1) capturing the direction of the difference and (2) allowing
cancellation of effects in opposite direction.
d_{MACS} and d_{MACS\_Signed}The effect size measures d_{MACS} and d_{MACS\_Signed} represent the
differences in both the factor loadings and the intercepts across two groups
and can be interpreted based on following guidelines (see Nye et al., 2019):
Effect Size Measure d_{MACS}:
Results of a simulation study provided benchmarks for interpreting d_{MACS}:
Small effect: 0.20
Medium effect: 0.40
Large effect: 0.70
The simulation study operationalized effect sizes empirically based on a literature review of journals in organizational behavior and entrepreneurship:
Difference in standardized factor loadings: 0.10 (small), 0.20 (medium), and 0.30 (large)
Difference in intercept: 0.25 (small), 0.50 (medium), and 0.75 (large)
Results also showed that when the sample size (n_g = 250) and/or
the number of items (k = 8) were small, d_{MACS} can become
greater than 0.20 due to poorly estimated model parameters.
Note that d_{MACS} does not provide information about the direction of
the effect, i.e., it is unclear which group the item is biased against.
Effect Size Measure d_{MACS\_Signed}:
Results of a simulation study provided benchmarks for interpreting d_{MACS\_Signed}:
Small effect: |0.40|
Medium effect: |0.60|
Large effect: |0.80|
Simulation study investigated the practical importance of non-invariance when no true latent mean difference exist between groups, i.e., false positive results due to non-invariance:
d_{MACS\_Signed} = |0.40| in one out of eight items results
in Cohen's d ~ 0.13 and a .13 probability for finding
statistically significant differences due to non-invariance.
d_{MACS\_Signed} = |0.60| in one out of eight items results
in Cohen's d ~ 0.26 and a .85 probability for finding
statistically significant differences due to non-invariance.
d_{MACS\_Signed} = |0.80| in one out of eight items results
in Cohen's d ~ 0.26 and a 1.00 probability for finding
statistically significant differences due to non-invariance.
The practical consequences of non-invariance can be investigated by computing the amount of the observed mean and variance difference of a scale between groups that can be attributed to non-invariance:
\Delta mean(x_s) = \sum_{1}^{n}\int (\hat{X}_{iR} - \hat{X}_{iF}|\xi) f_F(\xi)d\xi
\Delta var(x_s) = 2C_i\lambda_{iR} \phi_F + C_i^2\phi_F
where X_s is the scale score, \lambda_{iR} is the factor loading of
item i in the reference group, C_i is the difference
between the factor loading for item i in the reference and focal groups,
and \phi_F is the variance of the latent factor in the focal group.
According to these formula, two items with high d_{MACS\_Signed} in
opposite directions can have no impact on \Delta mean(x_s) and
\Delta var(x_s) due to the cancellation effect.
Note that with fewer items in the scale, the practical importance of a single
item with high d_{MACS\_Signed} would increase, while a single non-invariant
item in a longer measure would have less practical importance. For example,
the practical importance of a single non-invariant item with a d_{MACS\_Signed} = 0.40
in a 30-item measure would correspond to a Cohen’s d value of 0.05 and
a .14 probability of a statistically significant mean differences in the absence
of a true differences between groups. That is, the same cutoffs used for an 8-item
measure might not apply to a 30-item measure. Moreover, a measure with more than
one non-invariant item would have a greater chance of distorting research outcomes.
In summary, the findings in Nye et al. (2019) suggest that a more nuanced interpretation of the effect size of non-invariance may be required. Accordingly, Lai et al. (2025) notet that cutoff values should be used with caution as the interpretation of the magnitude of non-invariance should be based on many other factors, such as the construct of interest, the grouping variables, the main usage of the instrument, the context of the measurement, and so on.
Returns an object of class misty.object, which is a list with following
entries:
call |
function call |
type |
type of analysis |
data |
data frame including all variables used in the analysis, i.e., indicators for the factor, grouping variable and cluster variable |
args |
specification of function arguments |
model |
model specification for the for the configural invariance model |
model.fit |
fitted lavaan object of the configural invariance model |
check |
list with the results of the convergence and model identification check for the configural invariance model |
result |
list with result tables, i.e., |
This function is based on modified copies of the functions dmacs_summary
dmacs_summary_single, item_dmacs, expected_value,
delta_mean_item and delta_var from the dmacs package by
David Dueber.
Takuya Yanagida
Cohen, J. (1988). Statistical power analysis for the behavioral sciences (2nd ed.). Lawrence Erlbaum.
Dueber D (2026). dmacs: Measurement Nonequivalence Effect Size Calculator. R package version 0.1.0.9002. https://github.com/ddueber/dmacs
Glass, G. V. (1976). Primary, secondary, and meta-analysis of research. Educational Researcher, 5, 3-8.
Lai, M. H. C., Zhang, Y., Ozcan, M., Tse, W. W. Y., & Miles, A. (2025). fMACS: Generalizing dMACS effect size for measurement noninvariance with multiple groups and multiple grouping variables. Structural Equation Modeling: A Multidisciplinary Journal, 32(4), 638-646. https://doi.org/10.1080/10705511.2025.2484812
Nye, C. D., Bradburn, J., Olenick, J., Bialko, C., & Drasgow, F. (2019). How big are my effects? Examining the magnitude of the effect sizes in studies of measurement equivalence. Organizational Research Methods, 22(3), 678–709. https://doi.org/ 10.1177/1094428118761122
Nye, C., & Drasgow, F. (2011). Effect size indices for analyses of measurement equivalence: Understanding the practical importance of differences between groups. Journal of Applied Psychology, 96(5), 966-980.
item.invar, item.cfa, multilevel.invar
## Not run:
# Load data set "HolzingerSwineford1939" in the lavaan package
data("HolzingerSwineford1939", package = "lavaan")
#----------------------------------------------------------------------------
# Between-Group Measurement Non-Invariance: Continuous Indicators
#..................
# Measurement model with one factor
# Example 1a: Model specification using the argument '...'
item.noninvar(HolzingerSwineford1939, x1, x2, x3, x4, group = "school")
# Example 1b: Alternative model specification without using the argument '...'
item.noninvar(HolzingerSwineford1939[, c("x1", "x2", "x3", "x4")],
group = HolzingerSwineford1939$school)
# Example 1c: Alternative model specification without using the argument '...'
item.noninvar(HolzingerSwineford1939[, c("x1", "x2", "x3", "x4", "school")], group = "school")
# Example 1d: Alternative model specification using the argument 'model'
item.noninvar(HolzingerSwineford1939, model = c("x1", "x2", "x3", "x4"), group = "school")
# Example 1e: Estimate model and specify the 'object' argument
model <- 'f =~ x1 + x2 + x3 + x4'
fit <- cfa(model, data = HolzingerSwineford1939, group = "school", std.lv = TRUE)
item.noninvar(object = fit)
#..................
# Measurement model with two factors
# Example 2a: Model specification using the argument 'model'
item.noninvar(HolzingerSwineford1939,
model = list(c("x1", "x2", "x3", "x4"), c("x5", "x6", "x7", "x8")),
group = "school")
# Example 2b: Model specification using the argument 'model'
model <- 'f1 =~ x1 + x2 + x3 + x4
f2 =~ x5 + x6 + x7 + x8'
#..................
# Signed dMACS and reference group
# Example 3a: Signed dMACS
item.noninvar(HolzingerSwineford1939, x1, x2, x3, x4, group = "school", signed = TRUE)
# Example 3b: Specify reference group and use SD of the reference group
item.noninvar(HolzingerSwineford1939, x1, x2, x3, x4, group = "school",
ref = "Pasteur", pooled = FALSE)
#..................
# Residual covariances
# Example 4a: One residual covariance
item.noninvar(HolzingerSwineford1939, model = c("x1", "x2", "x3", "x4"),
rescov = c("x3", "x4"), group = "school")
# Example 4b: Two residual covariances
item.noninvar(HolzingerSwineford1939, model = c("x1", "x2", "x3", "x4"),
rescov = list(c("x1", "x4"), c("x3", "x4")), group = "school")
#..................
# Print argument
# Example 5: Request all results
item.noninvar(HolzingerSwineford1939, model = c("x1", "x2", "x3", "x4"),
group = "school", print = "all")
#----------------------------------------------------------------------------
# Longitudinal Measurement Non-Invariance: Continuous Indicators
# Example 6: Two time points with three indicators at each time point
item.noninvar(HolzingerSwineford1939,
model = list(c("x1", "x2", "x3"), c("x5", "x6", "x7")), long = TRUE)
#----------------------------------------------------------------------------
# Between-Group Measurement Non-Invariance: Ordered Categorical Indicators
#
# Note that the example analysis for ordered categorical indicators cannot be
# conduct as the data set 'data' is not available.
# Example 7: Two groups
item.noninvar(data, item1, item2, item3, item4, group = "two.group", ordered = TRUE)
#----------------------------------------------------------------------------
# Longitudinal Measurement Non-Invariance: Ordered Categorical Indicators
# Example 8: Two Time Points
item.noninvar(data, model = list(c("aitem1", "aitem2", "aitem3"),
c("bitem1", "bitem2", "bitem3")),
long = TRUE, ordered = TRUE)
#------------------------------------------------
# Write Results
# Example 9a: Write Results into a text file
item.noninvar(HolzingerSwineford1939, model = c("x1", "x2", "x3", "x4"),
group = "school", print = "all", write = "Non-Invariance.txt", output = FALSE)
# Example 9b: Write Results into a Excel file
item.noninvar(HolzingerSwineford1939, model = c("x1", "x2", "x3", "x4"),
group = "school", print = "all", write = "Non-Invariance.xlsx", output = FALSE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.