Unconstraining single items in measurementInvariance()

370 views
Skip to first unread message

Paul H

unread,
May 27, 2016, 7:09:43 PM5/27/16
to lavaan
Thanks to this very useful tutorial, I was able to identify the items which are least invariant across my groups. Removing these items did increase the cfi.delta. However, instead of excluding, is it possible to unconstrain the items in the model or the measurementInvariance() command to keep the items unconstrained across groups?

Thank you
Paul

Terrence Jorgensen

unread,
May 28, 2016, 7:57:07 AM5/28/16
to lavaan
However, instead of excluding, is it possible to unconstrain the items in the model or the measurementInvariance() command to keep the items unconstrained across groups?

That might be a more ideal way to handle it.  Excluding items is only justified if you conclude they do not measure the underlying construct.  An item could still be a valid measure even if the way it is associated with the underlying construct differs across particular populations.  But it depends whether you intend to model that construct using latent-variable models or intend to use a scale sum/mean as a proxy for the construct. 

This isn't software specific, so you should consider posting a general SEM question like this on SEMNET, which has a larger audience of SEM experts.  But if you need to know how to free item parameters across groups in lavaan, it depends how you impose the constraints.  If you use labels in the syntax, just give the parameters different labels.  But if you use the "group.equal" argument, you can provide exceptions of particular parameters to NOT constrain to equality, using the "group.partial" argument.


Terrence D. Jorgensen
Postdoctoral Researcher, Methods and Statistics
Research Institute for Child Development and Education, the University of Amsterdam

Paul H

unread,
May 28, 2016, 2:31:15 PM5/28/16
to lavaan
Thank you for your answer. I am imposing constraints using the measurementInvariance() argument, which does this, in my understanding automatically constrain the loadings and compares this constraint model with the configural model to test for metric invariance etc.
So in my understanding this is a lavaan/semTools specific question, as I would like to know how I can tell the command measurementInvariance() to unconstrain specific items. Using the group.partial/group.equal arguments in the cfa or sem command does not return a direct comparison of different models (configural, metric, strong, strict), as measurementInvariance() does. Or am I missing something?

Terrence Jorgensen

unread,
May 29, 2016, 5:03:14 AM5/29/16
to lavaan
Notice the help page tells you that you can pass any other arguments to cfa() via ...

?measurementInvariance

So if you know what parameters you want to free, you can run measurementInvariance() again with the group.partial argument, and your degrees of freedom should reflect how many parameters are not being constrained.  If any factor loadings have to be freed, remember to free those item intercepts as well.

Sunthud Pornprasertmanit

unread,
May 29, 2016, 9:47:13 AM5/29/16
to lavaan
I think the partialInvariance() function could serve your purpose. The resulting lavaan object can be extracted from the function. For example,

library(lavaan)

conf <- "
f1 =~ NA*x1 + x2 + x3
f2 =~ NA*x4 + x5 + x6
f1 ~~ c(1, 1)*f1
f2 ~~ c(1, 1)*f2
"

weak <- "
f1 =~ NA*x1 + x2 + x3
f2 =~ NA*x4 + x5 + x6
f1 ~~ c(1, NA)*f1
f2 ~~ c(1, NA)*f2
"

configural <- cfa(conf, data = HolzingerSwineford1939, std.lv = TRUE, group="school")
weak <- cfa(weak, data = HolzingerSwineford1939, group="school", group.equal="loadings")
models <- list(fit.configural = configural, fit.loadings = weak)
outs <- partialInvariance(models, "metric", return.fit = TRUE)
outs$models

--
You received this message because you are subscribed to the Google Groups "lavaan" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lavaan+un...@googlegroups.com.
To post to this group, send email to lav...@googlegroups.com.
Visit this group at https://groups.google.com/group/lavaan.
For more options, visit https://groups.google.com/d/optout.

Fabrício Fialho

unread,
May 29, 2016, 11:29:23 PM5/29/16
to lavaan
I have been testing for full/partial measurement invariance using the "group.equal"/"group.partial" arguments. I compare three groups in my analysis. Is it possible, e.g. to unconstrain a loading for one group only while holding it constrained to equality for other groups using the "group.partial" argument?

As an example, I am comparing a CFA for groups A, B, and C and I would like to unconstrain the factor loading for x1 for group C only (for groups A and B, the factor loading for x1 should be equal).

Paul H

unread,
May 30, 2016, 7:34:56 AM5/30/16
to lavaan
Thank you for this. In my reading, the final output of outs$models does not provide any information related to the comparison of the configural and weak model, just the overall fit if items are set free. anova(configural, weak) does, but does not provide any CFI.delta or RMSEA.delta. How is it possible to obtain them?
Unrestraining (i.e., freeing) an item does unfortunately not have an effect on the output of measurementInvariance(): Adding NA* before the items I want to free does seem to have an effect. Here is a short running example
model <- ' visual =~ x1 + x2 + NA*x3; 
textual =~ x4 + x5 + x6; speed =~ x7 + x8 + x9 '
measurementInvariance(model, 
                       data=HolzingerSwineford1939, 
                       group='school')

Just for clarification, I am hoping to get the same information in the end that measurementInvariance() returns, with one or more items being unrestrained/free:
     cfi rmsea cfi.delta rmsea.delta
fit.configural 0.923 0.097        NA          NA
fit.loadings   0.921 0.093     0.002       0.004
fit.intercepts 0.882 0.107     0.038       0.015
fit.means      0.840 0.122     0.042       0.015
Reply all
Reply to author
Forward
0 new messages