I would like to know, if I can specify a MG-CFA where the number of factors varies across groups in Mplus. Say I have a model with the same two factors in all groups, but in one sub-group the model has to be supplemented by a third factor in order to have appropriate fit. I think then it should still be possible to fit a MG model and test equality constraints for those factors the groups have in common. But how to do this in Mplus, i.e. how can I eliminate a factor from the models estimated in all but one sub-groups?

The short answer is that the group in question has its own BY statement.

The longer answer is that you need to be careful about the substantive interpretation in this case. When the 3rd factor is added and variables load on both the 2 original factors and this 3rd factor, the meaning of your 2 original factors may change for that group.

Thanks - If I do that Mplus argues that there is an undefined variable in a BY statetment (i.e. F3). Am I overlooking anything?

Re. the long answer, I believe f3 to be a nuissance variable causing differential measurement bias. I have taken from the bias literature that in such situations we might be able to still test measurement invariance on loadings, thresholds etc. if we adjust for the nuissance factor in the affected group.