I am attempting to inspect modification indices for a model with two latent variables measured at two times. I have no problem getting these for the configural invariance model but when I place equality constraints across group and time for the loadings and/or intercepts I can't figure out how to get the modification indices. I'd like to see if any of the individual constraints have a large modification index to double-check that the loadings and intercepts aren't misbehaving across time or group.
########## Weak Invariance model ##########
Grp2 <- '
## Define Latent Variables
PIE =~ c(s11, s11, s11)*PIE1 + c(s21, s21, s21)*PIE2 + c(s31, s31, s31)*PIE3
PIEt2 =~ c(s11, s11, s11)*PIE1t2 + c(s21, s21, s21)*PIE2t2 + c(s31, s31, s31)*PIE3t2
TW =~ c(s41, s41, s41)*TW13 + c(s51, s51, s51)*TW26 + c(s61, s61, s61)*TW45
TWt2 =~ c(s41, s41, s41)*TW13t2 + c(s51, s51, s51)*TW26t2 + c(s61, s61, s61)*TW45t2
## Residual for each indicator (and correlated residuals across time)
PIE1 ~~ PIE1
PIE2 ~~ PIE2
PIE3 ~~ PIE3
PIE1t2 ~~ PIE1t2
PIE2t2 ~~ PIE2t2
PIE3t2 ~~ PIE3t2
TW13 ~~ TW13
TW26 ~~ TW26
TW45 ~~ TW45
TW13t2 ~~ TW13t2
TW26t2 ~~ TW26t2
TW45t2 ~~ TW45t2
PIE1 ~~ PIE1t2
PIE2 ~~ PIE2t2
PIE3 ~~ PIE3t2
TW13 ~~ TW13t2
TW26 ~~ TW26t2
TW45 ~~ TW45t2
## Intercepts
PIE1 ~ c(S1, D1, C1)*1
PIE2 ~ c(S2, D2, C2)*1
PIE3 ~ c(S3, D3, C3)*1
TW13 ~ c(S4, D4, C4)*1
TW26 ~ c(S5, D5, C5)*1
TW45 ~ c(S6, D6, C6)*1
PIE1t2 ~ c(S7, D7, C7)*1
PIE2t2 ~ c(S8, D8, C8)*1
PIE3t2 ~ c(S9, D9, C9)*1
TW13t2 ~ c(S10, D10, C10)*1
TW26t2 ~ c(S11, D11, C11)*1
TW45t2 ~ c(S12, D12, C12)*1
## Latent Variances
PIE ~~ PIE
PIEt2 ~~ PIEt2
TW ~~ TW
TWt2 ~~ TWt2
## Latent Covariances
PIE ~~ PIEt2 + TW + TWt2
PIEt2 ~~ TW + TWt2
TW ~~ TWt2
## Latent Means
PIE ~ 1
PIEt2 ~ 1
TW ~ 1
TWt2 ~ 1
## Model Constraints for effects-coding
# PIE in all 3 groups
s11 == 3 - s21 - s31
# TW in all 3 groups
s41 == 3 - s51 - s61
# PIE means all 3 groups
S1 == 0 - S2 - S3
D1 == 0 - D2 - D3
C1 == 0 - C2 - C3
S4 == 0 - S5 - S6
D4 == 0 - D5 - D6
C4 == 0 - C5 - C6
S7 == 0 - S8 - S9
D7 == 0 - D8 - D9
C7 == 0 - C8 - C9
S10 == 0 - S11 - S12
D10 == 0 - D11 - D12
C10 == 0 - C11 - C12
'
fit2.1 <- lavaan(Grp2, data=Tw, group="Condition",
std.lv=F, auto.fix.first=F)
inspect(fit2.1, "modindices")