Hello,
I am examining measurement invariance of the health survey SF-12 (version 1) which has binary and ordered categorical items with 3 to 5 categories. The measure was used at three occasions within 10 years. Complete case N = 1000. I used semTools to fit the configural model.
The model is composed of two latent factors (mental and physical health). I am novice to this analysis and lavaan/semTools, but tried my best to write a correct code, hopefully. I do not consider measurement invariance between groups, but between the repeated measures.
Could you please take a look at the code and tell me if there is anything wrong?
The model converge, but the (residual?) covariances between H7 ~~ H1.7, H7 ~~ H2.7, and H1.7 ~~ H2.7 were negative (-.22 to -.55), although their polychoric correlations (lavCor) are positive. Do you have any suggestions why this happened and whether (and how) it should be fixed?
# Latent common factor definitions
MH =~ H6 + H7 + H9 + H10 + H11 + H12
PH =~ H1 + H2 + H3 + H4 + H5 + H8
H6 ~~ H7
H4 ~~ H5
H2 ~~ H3
H9 ~~ H11
f1MH =~ H1.6 + H1.7 + H1.9 + H1.10 + H1.11 + H1.12
f1PH =~ H1.1 + H1.2 + H1.3 + H1.4 + H1.5 + H1.8
H1.6 ~~ H1.7
H1.4 ~~ H1.5
H1.2 ~~ H1.3
H1.9 ~~ H1.11
f2MH =~ H2.6 + H2.7 + H2.9 + H2.10 + H2.11 + H2.12
f2PH =~ H2.1 + H2.2 + H2.3 + H2.4 + H2.5 + H2.8
H2.6 ~~ H2.7
H2.4 ~~ H2.5
H2.2 ~~ H2.3
H2.9 ~~ H2.11
'
syntax.config <- measEq.syntax(configural.model =
mod.cat,
data = dat,
ordered = c("H6","H7","H9","H10","H11","H12",
"H1","H2","H3","H4","H5","H8",
"H1.6","H1.7","H1.9","H1.10","H1.11","H1.12",
"H1.1","H1.2","H1.3","H1.4", "H1.5","H1.8",
"H2.6","H2.7","H2.9","H2.10","H2.11","H2.12",
"H2.1","H2.2","H2.3","H2.4", "H2.5","H2.8"),
parameterization = "theta",
longFacNames = list(MHtime = c("MH","f1MH","f2MH"),
PHtime = c("PH","f1PH","f2PH")),
longIndNames = list(L6 = c("H6","H1.6","H2.6"),
L7 = c("H7","H1.7","H2.7"),
L9 = c("H9","H1.9","H2.9"),
L10 = c("H10","H1.10","H2.10"),
L11 = c("H11","H1.11","H2.11"),
L12 = c("H12","H1.12","H2.12"),
L1 = c("H1","H1.1","H2.1"),
L2 = c("H2","H1.2","H2.2"),
L3 = c("H3","H1.3","H2.3"),
L4 = c("H4","H1.4","H2.4"),
L5 = c("H5","H1.5","H2.5"),
L8 = c("H8","H1.8","H2.8")),
ID.fac = "UV", # UV due to bifactor model
ID.cat = "Wu.Estabrook.2016",
auto = TRUE,
group = NULL,
return.fit = TRUE)
And: the next step would be to set constraints step by step, beginning with long.equal = "thresholds" ?
I'd be grateful for any hints. Thank you in advance!
Best,
Stanley