Hi,
In an attempt to compare the intercepts of the first-order factor between male
and female, I tried to follow Alex's advice by constraining the higher-level
factor (IAT) to have the mean of 0. Strangely, this time, lavaan programme
tried to estimate the intercepts of the first-order factor in BOTH male and
female, instead of constraining the intercepts of the reference group (male) to
be zero. As a result, the model cannot estimate the standard errors and other
important results.
Thanks so much!
Chester
Below is my syntax:
myModel =
"
# lambda (factor loadings for all measured variables)
LC =~ 1*Q3 + Q5 + Q9 + Q10 + Q11 + Q12 + Q13 + Q15 + Q18 + Q19 + Q20
DD =~ 1*Q2 + Q4 + Q6 + Q7 + Q8 +Q14
EU =~ 1*Q1 + Q16 + Q17
# beta (causal paths)
IAT =~ 1*LC + DD + EU
# alpha (latent variable intercept)
LC ~ 1
DD ~ 1
EU ~ 1
IAT ~ 0*1
"
fit.6 = cfa(
myModel, data = IAT_gp2, estimator = "MLR", test =
"Satorra.Bentler",
meanstructure = TRUE, group="Gender", group.label
= c("1", "2"),
group.equal = c("loadings",
"intercepts")
)
summary(fit.6)
OUTPUT (with important parts highlighted in red):
lavaan (0.5-14)
converged normally after 57 iterations
Number of observations per
group
1
70
2
92
Estimator
ML
Minimum Function Test
Statistic
508.283
Degrees of freedom
367 (the df should be
370 if the intercepts of the first-order factor in the reference group are all
set to zeros)
P-value
(Chi-square)
0.000
Chi-square for each group:
1
276.698
2
231.585
Parameter estimates:
Information
Expected
Standard
Errors
Standard
Group 1 [1]:
Estimate Std.err Z-value P(>|z|)
Latent variables:
LC =~
Q3
1.000
Q5
0.938
Q9
0.901
Q10
1.141
Q11
1.547
Q12
1.505
Q13
1.202
Q15
1.317
Q18
1.526
Q19
1.047
Q20
1.316
DD =~
Q2
1.000
Q4
0.881
Q6
1.236
Q7
0.736
Q8
0.931
Q14
0.988
EU =~
Q1
1.000
Q16
1.181
Q17
1.101
IAT =~
LC
1.000
DD
0.850
EU
1.212
Intercepts:
LC
0.082
DD
0.057
EU
-0.032
IAT
0.000
Q3
2.100
Q5
2.123
Q9
1.960
Q10
2.066
Q11
2.547
Q12
2.889
Q13
2.094
Q15
2.029
Q18
2.206
Q19
1.948
Q20
2.035
Q2
1.903
Q4
1.746
Q6
1.914
Q7
2.005
Q8
1.750
Q14
1.673
Q1
2.788
Q16
2.877
Q17
2.428
Variances:
Q3
1.268
Q5
1.263
Q9
0.873
Q10
1.138
Q11
0.699
Q12
1.280
Q13
1.351
Q15
0.533
Q18
1.053
Q19
0.967
Q20
0.927
Q2
0.781
Q4
0.994
Q6
0.598
Q7
0.978
Q8
0.297
Q14
0.798
Q1
1.609
Q16
1.641
Q17
1.165
LC
-0.015
DD
0.163
EU
0.046
IAT
0.414
Group 2 [2]:
Estimate Std.err Z-value P(>|z|)
Latent variables:
LC =~
Q3
1.000
Q5
0.938
Q9
0.901
Q10
1.141
Q11
1.547
Q12
1.505
Q13
1.202
Q15
1.317
Q18
1.526
Q19
1.047
Q20
1.316
DD =~
Q2
1.000
Q4
0.881
Q6
1.236
Q7
0.736
Q8
0.931
Q14
0.988
EU =~
Q1
1.000
Q16
1.181
Q17
1.101
IAT =~
LC
1.000
DD
0.850
EU
1.212
Intercepts:
LC
-0.027
DD
-0.023
EU
0.022
IAT
0.000
Q3
2.100
Q5
2.123
Q9
1.960
Q10
2.066
Q11
2.547
Q12
2.889
Q13
2.094
Q15
2.029
Q18
2.206
Q19
1.948
Q20
2.035
Q2
1.903
Q4
1.746
Q6
1.914
Q7
2.005
Q8
1.750
Q14
1.673
Q1
2.788
Q16
2.877
Q17
2.428
Variances:
Q3
1.192
Q5
0.731
Q9
1.194
Q10
0.725
Q11
0.797
Q12
1.180
Q13
0.801
Q15
0.580
Q18
0.862
Q19
0.955
Q20
0.901
Q2
0.567
Q4
0.826
Q6
0.404
Q7
1.675
Q8
0.515
Q14
0.690
Q1
0.790
Q16
0.733
Q17
0.874
LC
-0.019
DD
0.149
EU
0.136
IAT
0.476
I have also tried the set the syntax as the following but
lavaan tried to set the intercepts of the first-order factor to be the same in both male
and female groups:
myModel = "
# lambda (factor loadings for all measured variables)
LC =~ 1*Q3 + Q5 + Q9 + Q10 + Q11 + Q12 + Q13 + Q15 + Q18 + Q19 + Q20
DD =~ 1*Q2 + Q4 + Q6 + Q7 + Q8 +Q14
EU =~ 1*Q1 + Q16 + Q17
# beta (causal paths)
IAT =~ 1*LC + DD + EU
# alpha (latent variable intercept)
LC ~ c(0, aa)*1
DD ~ c(0, bb)*1
EU ~ c(0, dd)*1
IAT ~ 0*1
"
Selected Output:
Group 1 Intercepts:
LC (aa) 0.029
DD (bb) 0.022
EU (dd) -0.002
IAT 0.000
Group 2 Intercepts:
LC (aa) 0.029
DD (bb) 0.022
EU (dd) -0.002
IAT 0.000