For item \(i\), let \(\nu_R\) and \(\lambda_R\) be the reference
group's intercept and loading, let \(\nu_F\) and \(\lambda_F\) be the
focal group's, and let the focal group's latent variable be
\(\eta \sim N(\mu_F, \sigma_F^2)\) with density \(f_F\). Each group's
measurement equation gives an expected item score at every value of
\(\eta\), and dMACS is the root mean squared vertical distance between
those two lines over the focal group's latent distribution, divided by the
pooled item standard deviation:
$$d_{MACS, i} = \frac{1}{SD_i} \sqrt{\int \left[ (\nu_R + \lambda_R
\eta) - (\nu_F + \lambda_F \eta) \right]^2 f_F(\eta) \, d\eta}.$$
Writing \(a = \nu_R - \nu_F\) for the intercept difference and
\(b = \lambda_R - \lambda_F\) for the loading difference, the integrand is
\((a + b\eta)^2\) and the integral is the second moment of a linear
function of a normal variate, so it has the closed form
\(a^2 + 2ab\mu_F + b^2(\sigma_F^2 + \mu_F^2)\). No numerical integration
is performed. The standardizer is the pooled observed standard deviation of
the item,
$$SD_i = \sqrt{\frac{(n_R - 1)s_R^2 + (n_F - 1)s_F^2}{n_R + n_F - 2}},$$
the same pooling used by the standardized mean difference, which puts dMACS
on a scale a reader of smd already understands.
dMACS is a root mean square and so is nonnegative by construction; it
carries no sign and is not given one here. The direction of the violation
is read from the returned components: \(\nu_R - \nu_F\) says which group
is scored higher at the mean of the latent variable, and
\(\lambda_R - \lambda_F\) says in which group the item discriminates more
sharply. When only the intercepts differ, the integral collapses to
\(a^2\) and dMACS reduces to \(|a| / SD_i\), a plain standardized
intercept difference.
The index is interpretable only when the two groups' loadings and
intercepts are expressed on a common metric. In practice that means a
partial invariance model in which a set of anchor items is constrained
equal across groups while the suspect items are freed, and the focal
group's latent mean and variance are freely estimated. A configural model,
which sets each group's latent scale separately, does not put the groups on
a common metric, and dMACS computed from one is not meaningful. The usual
workflow is therefore measurement_invariance to locate where
the ladder breaks, a partial invariance refit that frees the offending
parameters, and then dmacs() on that refit to judge whether the
violation is large enough to matter.
On the fit path each group's item variance is computed from the data in the
fit with the usual \(n - 1\) divisor, using the number of nonmissing
observations for that item in that group. When the model was fitted from
sample moments rather than raw data, the sample covariances in the fit are
used instead, rescaled to the \(n - 1\) divisor when the fit's likelihood
option calls for it.