This question has been asked
before, however no satisfactory answer was given.
Let's say that I have the following CFA model:
fit.a.cfa <- '
A =~ A1 + A2 + A3 + A4 + A5 + A6
A ~~ A
' %>% cfa(data = A_data)
If I wanted to assess measurement invariance of this model across genders, I would use:
fit.a.cfa <- '
A =~ A1 + A2 + A3 + A4 + A5 + A6
A ~~ A
' %>% measurementInvariance(model = ., data = A_data, group = "Gender", std.lv = T)
Running this function revealed that there is no full measurement invariance, and so I proceeded with partial measurement invariance:
fit.a.cfa.partial.weak <- partialInvariance(fit.a.cfa, type = "weak", return.fit = T)
This procedure has revealed that there is partial weak measurement invariance - the model in which the factor loadings on the 5th item are unconstrained across groups, and all the other loadings are constrained works as well as the configural model. The next step is strong partial invariance testing. However, it is not possible to simply use something like:
fit.a.cfa.partial.strong <- partialInvariance(fit.a.cfa, type = "strong", return.fit = T)
because this will compare various model with freed/fixed intercepts with the model in which all the factor loadings are constrained to be equal. This is not what I need, I need a model in which all the factor loadings except the 5th one are constrained to be equal. While browsing through the previous question asked on the forum, I found that Terrence Jorgensen said:
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.
However, this doesn't seem to work. I used the following code:
fit.a.cfa <- '
A =~ A1 + A2 + A3 + A4 + A5 + A6
A ~~ A
' %>% measurementInvariance(model = ., data = A_data, group = "Gender", std.lv = T, group.partial = "A=~A1")
Calling summary(fit.a.cfa$fit.loadings)reveals that the factor loadings of the 5th item are equal in both groups, like I didn't pass the group.partial argument at all. Am I doing something wrong? How can I get the model I need for comparison during the strong partial invariance testing?