Can anyone point me to some documentation on how lavaan determines the order of groups in a multiple group factor analysis? I'm conducting a measurement equivalence test and I want to force one specific group to be the referent by having a latent mean of zero. By default, lavaan forces the "first" group's latent mean to be zero, but can anyone tell how it determines what the "first" group is? My grouping variable is of type integer so I thought perhaps it would keep the order the same as in the data, 1, 2, 3. However, I wanted to make sure that the mean for group 3 was fixed to zero while the other two were estimated, so I used the syntax I found in an earlier thread:
f1~c(m1, m2, m0)*1 + c(NA, NA, 0)*1.
Looking at the output, this did indeed fix the third group's latent mean to be zero. However, lavaan ordered the groups as 3, 1, 2, which resulted in the mean being fixed to zero for group 2 rather than 3.
I thought perhaps the order was a function of group size, but my Ns are 7043 (group 3), 1843 (group 1), and 3028 (group 2) so it's not ordering them by sample size. I know that I can just remove the labels for the current analysis and lavaan will fix the latent mean for the correct first group (group 3) to zero, but going forward I'd like to be able to know how the order is determined apriori so I can make sure I'm fixing the correct parameters in my syntax.
Thank you.