|
|
|
||||
|
Help the Stat Consulting Group by
giving a gift
| |||||
|
Loading
|
|||||
This page will show the steps and the Stata code for checking invariance using a single factor example with two groups. The data are found in an ssd file named invariance.dta. There are five items in the data, cesd01, cesd02, cesd07, cesd11 and cesd20 along with a grouping variable grp.
We will skip over several very necessary preliminary steps assuming that separate CFAs for each group have been estimated along with a combined CFA on all observations treated as a single group and have displayed no major problems. We are also going to assume that each group has the same number of factors, in this case, one.use http://www.ats.ucla.edu/stat/data/invariance.dta, clear
We will begin by estimating a two group model in which all parameters are freely estimated. For model identification purposes we will fix the loading for the first item at one and the item intercepts at zero. We will estimate the factor variance for group 1 instead of sem's default of zero. This model with all parameters free gives us an idea of the best fit for the measurement model that we can obtain with these data.
* model 1 -- free all parameters
sem (Somatic -> cesd01@1 cesd02 cesd07 cesd11 cesd20) ///
(Somatic -> cesd01@1) /// /* set loading to 1 in both groups */
(cesd01 <- Somatic _cons@0) /// /* set intercept to 0 in both groups */
, group(grp) ///
ginvariant(none) /// /* no invariant parameters */
mean(1: Somatic@m1) /* estimate mean for grp 1 */
Endogenous variables
Measurement: cesd01 cesd02 cesd07 cesd11 cesd20
Exogenous variables
Latent: Somatic
Fitting target model:
Iteration 0: log likelihood = -13308.842
Iteration 1: log likelihood = -13051.707 (not concave)
[output omitted]
Iteration 47: log likelihood = -12473.244
Iteration 48: log likelihood = -12473.244
Structural equation model Number of obs = 2252
Grouping variable = grp Number of groups = 2
Estimation method = ml
Log likelihood = -12473.244
( 1) [cesd01]1bn.grp#c.Somatic = 1
( 2) [cesd01]1bn.grp = 0
( 3) [cesd01]2.grp#c.Somatic = 1
( 4) [cesd01]2.grp = 0
------------------------------------------------------------------------------
| OIM
| Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
Measurement |
cesd01 <- |
Somatic |
[*] | 1 (constrained)
_cons |
[*] | 0 (constrained)
-----------+----------------------------------------------------------------
cesd02 <- |
Somatic |
1 | .928435 .062672 14.81 0.000 .8056002 1.05127
2 | .8385611 .1891791 4.43 0.000 .4677769 1.209345
_cons |
1 | -.0648223 .0273122 -2.37 0.018 -.1183533 -.0112914
2 | .0525936 .0860614 0.61 0.541 -.1160837 .2212709
-----------+----------------------------------------------------------------
cesd07 <- |
Somatic |
1 | 1.677874 .1007259 16.66 0.000 1.480455 1.875293
2 | 1.758985 .3554401 4.95 0.000 1.062335 2.455634
_cons |
1 | -.0653832 .0428129 -1.53 0.127 -.1492949 .0185285
2 | .1893793 .1541684 1.23 0.219 -.1127853 .4915438
-----------+----------------------------------------------------------------
cesd11 <- |
Somatic |
1 | 1.388108 .0901113 15.40 0.000 1.211494 1.564723
2 | 1.341272 .2818361 4.76 0.000 .788883 1.89366
_cons |
1 | .1565085 .0391205 4.00 0.000 .0798337 .2331832
2 | .1181773 .1226974 0.96 0.335 -.1223051 .3586597
-----------+----------------------------------------------------------------
cesd20 <- |
Somatic |
1 | 1.474365 .090211 16.34 0.000 1.297555 1.651175
2 | 1.491461 .282652 5.28 0.000 .9374732 2.045449
_cons |
1 | -.0469629 .0383135 -1.23 0.220 -.122056 .0281301
2 | -.0675705 .1211398 -0.56 0.577 -.3050001 .1698591
-------------+----------------------------------------------------------------
Mean |
Somatic |
1 | .32834 .0157635 20.83 0.000 .2974441 .3592359
2 | .35081 .0446252 7.86 0.000 .2633461 .4382738
-------------+----------------------------------------------------------------
Variance |
e.cesd01 |
1 | .3762446 .0136731 .3503779 .4040209
2 | .3686835 .0406348 .2970555 .4575828
e.cesd02 |
1 | .3219994 .0117202 .2998284 .3458098
2 | .485269 .0485134 .3989202 .5903084
e.cesd07 |
1 | .4220553 .0197965 .3849849 .4626952
2 | .8977649 .1035432 .7161266 1.125474
e.cesd11 |
1 | .5876808 .0221566 .5458203 .6327516
2 | .6459501 .0705419 .5214856 .800121
e.cesd20 |
1 | .3656715 .0162806 .3351148 .3990144
2 | .3808461 .0549203 .2870787 .5052403
Somatic |
1 | .1217268 .012324 .0998179 .1484445
2 | .1251867 .0377611 .0693111 .2261066
------------------------------------------------------------------------------
Note: [*] identifies parameter estimates constrained to be equal across
groups.
LR test of model vs. saturated: chi2(10) = 25.11, Prob > chi2 = 0.0051
We will record the chi-square value (25.11) and degrees of freedom (10) for
comparison
with the next model. The p-value for this model (.0051) is indicates that this does not
fit our particularly well.
We will ignore this issue to focus on the steps in checking factor invariance.Checking factor invariance involves a hierarchy of steps that progressively constrains more parameters to be equal across the groups. Here is a listing the steps in the hierarchy along with which parameters are being constrained.
model 1 -- all parameters free (above) model 2 -- metric (pattern) invariance -- loadings are invariant model 3 -- strong (scalar) invariance -- loadings & intercepts are invariant model 4 -- strict invariance -- loadings, intercepts & residuals are invariant model 5 -- strict invariance plus factor means are invariant model 6 -- strict invariance plus factor means & variances are invariantNow we can check for metric invariance.
* model 2 -- metric invariance -- loadings invariant
sem (Somatic -> cesd01 cesd02 cesd07 cesd11 cesd20) ///
(cesd01 <- Somatic _cons@0) /// /* fix intercept at 0 both groups */
(Somatic->cesd07@l1) /// /* constrain loadings */
(1: cesd07@i1)(2: cesd07@i2) /// /* free intercepts */
(Somatic->cesd11@l2) /// /* constrain loadings */
(1: cesd11@i3)(2: cesd07@i4) /// /* free intercepts */
(Somatic->cesd20@l3) /// /* constrain loadings */
(1: cesd20@i5)(2: cesd20@i6) /// /* free intercepts */
(Somatic->cesd02@l4) /// /* constrain loadings */
(1: cesd02@i7)(2: cesd02@i8) /// /* free intercepts */
, group(grp) ///
mean(1: Somatic@m1) /* estimate factor mean for grp 1 */
Endogenous variables
Observed: cesd02 cesd07 cesd11 cesd20
Measurement: cesd01
Exogenous variables
Latent: Somatic
Fitting target model:
Iteration 0: log likelihood = -13284.565
Iteration 1: log likelihood = -12652.048
Iteration 2: log likelihood = -12484.832
Iteration 3: log likelihood = -12474.294
Iteration 4: log likelihood = -12473.477
Iteration 5: log likelihood = -12473.472
Iteration 6: log likelihood = -12473.472
Structural equation model Number of obs = 2252
Grouping variable = grp Number of groups = 2
Estimation method = ml
Log likelihood = -12473.472
( 1) [cesd01]1bn.grp#c.Somatic = 1
( 2) [cesd02]1bn.grp#c.Somatic - [cesd02]2.grp#c.Somatic = 0
( 3) [cesd07]1bn.grp#c.Somatic - [cesd07]2.grp#c.Somatic = 0
( 4) [cesd11]1bn.grp#c.Somatic - [cesd11]2.grp#c.Somatic = 0
( 5) [cesd20]1bn.grp#c.Somatic - [cesd20]2.grp#c.Somatic = 0
( 6) [cesd01]1bn.grp = 0
( 7) [cesd01]2.grp#c.Somatic = 1
( 8) [cesd01]2.grp = 0
------------------------------------------------------------------------------
| OIM
| Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
Structural |
cesd02 <- |
Somatic |
[*] | .9209276 .0593449 15.52 0.000 .8046138 1.037242
_cons |
1 | -.0623574 .0264546 -2.36 0.018 -.1142075 -.0105072
2 | .0236994 .0601589 0.39 0.694 -.0942099 .1416087
-----------+----------------------------------------------------------------
cesd07 <- |
Somatic |
[*] | 1.681261 .0965874 17.41 0.000 1.491953 1.870568
_cons |
1 | -.0664951 .0417905 -1.59 0.112 -.148403 .0154128
2 | .216647 .0949812 2.28 0.023 .0304873 .4028067
-----------+----------------------------------------------------------------
cesd11 <- |
Somatic |
[*] | 1.381923 .0856666 16.13 0.000 1.214019 1.549826
_cons |
1 | .1585395 .0379905 4.17 0.000 .0840794 .2329995
2 | .1039177 .0794803 1.31 0.191 -.0518609 .2596962
-----------+----------------------------------------------------------------
cesd20 <- |
Somatic |
[*] | 1.474055 .085681 17.20 0.000 1.306123 1.641987
_cons |
1 | -.0468612 .0371712 -1.26 0.207 -.1197153 .025993
2 | -.0614632 .0753769 -0.82 0.415 -.2091993 .0862729
-------------+----------------------------------------------------------------
Measurement |
cesd01 <- |
Somatic |
[*] | 1 (constrained)
_cons |
[*] | 0 (constrained)
-------------+----------------------------------------------------------------
Mean |
Somatic |
1 | .32834 .015768 20.82 0.000 .2974353 .3592447
2 | .35081 .0445244 7.88 0.000 .2635438 .4380762
-------------+----------------------------------------------------------------
Variance |
e.cesd01 |
1 | .3762228 .0136197 .3504536 .4038867
2 | .3673419 .0376073 .3005572 .4489665
e.cesd02 |
1 | .3225452 .0116904 .3004274 .3462914
2 | .4785012 .0466075 .3953424 .5791521
e.cesd07 |
1 | .4209217 .0196516 .3841149 .4612554
2 | .9142389 .0951236 .7455811 1.121049
e.cesd11 |
1 | .5883498 .0220535 .5466753 .6332013
2 | .6411438 .0662853 .5235438 .7851594
e.cesd20 |
1 | .3654038 .0161423 .3350965 .3984522
2 | .3868222 .0466565 .3053824 .4899806
Somatic |
1 | .1220313 .0118595 .1008668 .1476367
2 | .1242983 .0198831 .0908457 .1700693
------------------------------------------------------------------------------
Note: [*] identifies parameter estimates constrained to be equal across
groups.
LR test of model vs. saturated: chi2(14) = 25.57, Prob > chi2 = .97727633
For this model chi-square equals 25.57 with 10 degrees of freedom. We can compare this with model
1 by computing the differences in chi-square and degrees of freedom.
The extremely small change in chi-square tells us that the model in which the factor loadings are constrained to be equal fits equally as well as the model with all parameters free to vary. The bottom line is that we have demonstrated metric factor invariance for this single factor model.chi2 = 25.57 - 25.11 = .46 with df(14-10 = 4), p-value = 2.463e-09
Next, we can check for strong invariance in which both factor loadings and intercepts are constrained to be equal across groups. By default, the sem estimates a model with strong invariance whenever you include the group option. Our version of strong invariance fits the same but is parameterized slightly differently.
* model 3 -- strong invariance -- loadings & intercepts invariant
sem (Somatic -> cesd01 cesd02 cesd07 cesd11 cesd20) ///
(cesd01 <- Somatic _cons@0) /// /* fix intercept at 0 both groups */
, group(grp) ///
mean(1: Somatic@m1) /* estimate factor mean for grp 1 */
Endogenous variables
Measurement: cesd01 cesd02 cesd07 cesd11 cesd20
Exogenous variables
Latent: Somatic
Fitting target model:
Iteration 0: log likelihood = -13516.826 (not concave)
Iteration 1: log likelihood = -12634.906 (not concave)
[output omitted]
Iteration 9: log likelihood = -12483.842
Iteration 10: log likelihood = -12483.841
Structural equation model Number of obs = 2252
Grouping variable = grp Number of groups = 2
Estimation method = ml
Log likelihood = -12483.841
( 1) [cesd01]1bn.grp#c.Somatic = 1
( 2) [cesd02]1bn.grp#c.Somatic - [cesd02]2.grp#c.Somatic = 0
( 3) [cesd07]1bn.grp#c.Somatic - [cesd07]2.grp#c.Somatic = 0
( 4) [cesd11]1bn.grp#c.Somatic - [cesd11]2.grp#c.Somatic = 0
( 5) [cesd20]1bn.grp#c.Somatic - [cesd20]2.grp#c.Somatic = 0
( 6) [cesd01]1bn.grp = 0
( 7) [cesd02]1bn.grp - [cesd02]2.grp = 0
( 8) [cesd07]1bn.grp - [cesd07]2.grp = 0
( 9) [cesd11]1bn.grp - [cesd11]2.grp = 0
(10) [cesd20]1bn.grp - [cesd20]2.grp = 0
(11) [cesd01]2.grp#c.Somatic = 1
(12) [cesd01]2.grp = 0
------------------------------------------------------------------------------
| OIM
| Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
Measurement |
cesd01 <- |
Somatic |
[*] | 1 (constrained)
_cons |
[*] | 0 (constrained)
-----------+----------------------------------------------------------------
cesd02 <- |
Somatic |
[*] | .9249795 .0595205 15.54 0.000 .8083215 1.041638
_cons |
[*] | -.0560251 .0260192 -2.15 0.031 -.1070218 -.0050285
-----------+----------------------------------------------------------------
cesd07 <- |
Somatic |
[*] | 1.688943 .0971202 17.39 0.000 1.498591 1.879295
_cons |
[*] | -.0513029 .0412593 -1.24 0.214 -.1321696 .0295638
-----------+----------------------------------------------------------------
cesd11 <- |
Somatic |
[*] | 1.376843 .0854916 16.11 0.000 1.209283 1.544404
_cons |
[*] | .1552514 .037177 4.18 0.000 .0823858 .2281171
-----------+----------------------------------------------------------------
cesd20 <- |
Somatic |
[*] | 1.471068 .0854962 17.21 0.000 1.303498 1.638637
_cons |
[*] | -.0469581 .0364197 -1.29 0.197 -.1183394 .0244232
-------------+----------------------------------------------------------------
Mean |
Somatic |
1 | .3246982 .0152092 21.35 0.000 .2948888 .3545076
2 | .3795509 .0299712 12.66 0.000 .3208084 .4382935
-------------+----------------------------------------------------------------
Variance |
e.cesd01 |
1 | .3763018 .0136198 .3505323 .4039657
2 | .3675061 .0376885 .3005883 .4493214
e.cesd02 |
1 | .3223506 .0116913 .3002315 .3460993
2 | .4804669 .0469221 .3967671 .5818235
e.cesd07 |
1 | .4199315 .0196947 .3830515 .4603622
2 | .9738935 .1014744 .7940008 1.194544
e.cesd11 |
1 | .5892406 .0220642 .5475444 .634112
2 | .6518477 .0673462 .5323576 .7981579
e.cesd20 |
1 | .366112 .0161388 .3358084 .3991501
2 | .3924233 .0473101 .3098381 .4970209
Somatic |
1 | .1218173 .0118432 .1006825 .1473885
2 | .1229574 .019835 .0896277 .1686813
------------------------------------------------------------------------------
Note: [*] identifies parameter estimates constrained to be equal across
groups.
LR test of model vs. saturated: chi2(18) = 46.31, Prob > chi2 = 0.0003
We can see how this model fits relative to metric invariance by differencing the
chi-square from the previous model.
The fit of the strong invariance model is significantly poorer than the fit of the metric invariance model. So, we cannot assume strong invariance.chi2 = 46.31 - 25.57 = 20.74 with df(18-14=4), p-value = .00035656
There are still three steps remaining in the invariance testing hierarchy. Even though we did not meet the invariance requirement for step 3, we will demonstrate how to run the remaining steps beginning with strict factor invariance which constrains loadings, intercepts and residuals.
* model 4 -- strict invariance -- loadings, intercepts & residuals invariant
sem (Somatic -> cesd01 cesd02 cesd07 cesd11 cesd20) ///
(cesd01 <- Somatic _cons@0) /// /* fix intercept at 0 both groups */
, group(grp) ///
variance(e.cesd01@v1) /// /* constrain residuals */
variance(e.cesd11@v2) /// /* constrain residuals */
variance(e.cesd20@v3) /// /* constrain residuals */
variance(e.cesd02@v4) /// /* constrain residuals */
variance(e.cesd07@v5) /// /* constrain residuals */
mean(1: Somatic@m1) /* estimate factor mean for grp 1 */
Exogenous variables
Latent: Somatic
Fitting target model:
Iteration 0: log likelihood = -13493.497 (not concave)
[output omitted]
Iteration 9: log likelihood = -12524.619
Structural equation model Number of obs = 2252
Grouping variable = grp Number of groups = 2
Estimation method = ml
Log likelihood = -12524.619
( 1) [cesd01]1bn.grp#c.Somatic = 1
( 2) [cesd02]1bn.grp#c.Somatic - [cesd02]2.grp#c.Somatic = 0
( 3) [cesd07]1bn.grp#c.Somatic - [cesd07]2.grp#c.Somatic = 0
( 4) [cesd11]1bn.grp#c.Somatic - [cesd11]2.grp#c.Somatic = 0
( 5) [cesd20]1bn.grp#c.Somatic - [cesd20]2.grp#c.Somatic = 0
( 6) [var(e.cesd01)]1bn.grp - [var(e.cesd01)]2.grp = 0
( 7) [var(e.cesd02)]1bn.grp - [var(e.cesd02)]2.grp = 0
( 8) [var(e.cesd07)]1bn.grp - [var(e.cesd07)]2.grp = 0
( 9) [var(e.cesd11)]1bn.grp - [var(e.cesd11)]2.grp = 0
(10) [var(e.cesd20)]1bn.grp - [var(e.cesd20)]2.grp = 0
(11) [cesd01]1bn.grp = 0
(12) [cesd02]1bn.grp - [cesd02]2.grp = 0
(13) [cesd07]1bn.grp - [cesd07]2.grp = 0
(14) [cesd11]1bn.grp - [cesd11]2.grp = 0
(15) [cesd20]1bn.grp - [cesd20]2.grp = 0
(16) [cesd01]2.grp#c.Somatic = 1
(17) [cesd01]2.grp = 0
------------------------------------------------------------------------------
| OIM
| Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
Measurement |
cesd01 <- |
Somatic |
[*] | 1 (constrained)
_cons |
[*] | 0 (constrained)
-----------+----------------------------------------------------------------
cesd02 <- |
Somatic |
[*] | .9265332 .0600708 15.42 0.000 .8087966 1.04427
_cons |
[*] | -.0547348 .0262507 -2.09 0.037 -.1061853 -.0032844
-----------+----------------------------------------------------------------
cesd07 <- |
Somatic |
[*] | 1.714776 .09999 17.15 0.000 1.518799 1.910753
_cons |
[*] | -.0464016 .0423768 -1.09 0.274 -.1294587 .0366554
-----------+----------------------------------------------------------------
cesd11 <- |
Somatic |
[*] | 1.377827 .0859593 16.03 0.000 1.20935 1.546304
_cons |
[*] | .1538792 .0372906 4.13 0.000 .080791 .2269674
-----------+----------------------------------------------------------------
cesd20 <- |
Somatic |
[*] | 1.465235 .0856664 17.10 0.000 1.297331 1.633138
_cons |
[*] | -.0455513 .0364271 -1.25 0.211 -.1169472 .0258446
-------------+----------------------------------------------------------------
Mean |
Somatic |
1 | .3225318 .0151328 21.31 0.000 .292872 .3521916
2 | .3977438 .0304149 13.08 0.000 .3381317 .457356
-------------+----------------------------------------------------------------
Variance |
e.cesd01 |
[*] | .3759644 .0129793 .3513671 .4022837
e.cesd02 |
[*] | .3397691 .0116453 .3176945 .3633775
e.cesd07 |
[*] | .4745692 .0208849 .4353513 .51732
e.cesd11 |
[*] | .5968166 .0212554 .5565775 .6399648
e.cesd20 |
[*] | .3724319 .0157235 .3428549 .4045605
Somatic |
1 | .1185613 .0116213 .0978382 .1436737
2 | .141167 .0208813 .105639 .1886437
------------------------------------------------------------------------------
Note: [*] identifies parameter estimates constrained to be equal across
groups.
LR test of model vs. saturated: chi2(23) = 127.86, Prob > chi2 = 0.0000
As you can see the fit is becoming even poorer.
Next up is a demonstration of strict factor invariance with factor means constrained to be equal across groups.chi2 = 127.86 - 46.31 = 81.55 with df(23-18=5), p-value = 3.976e-16
* model 5 -- strict invariance plus equal factor means
sem (Somatic -> cesd01 cesd02 cesd07 cesd11 cesd20) ///
(1: Somatic -> cesd01@1) /// /* fix loading at 1 for group 1 */
(2: Somatic -> cesd01@1) /// /* fix loading at 1 for group 2 */
(cesd01 <- Somatic _cons@0) /// /* fix intercept at 0 both groups */
, group(grp) ///
variance(e.cesd01@v1) /// /* constrain residuals */
variance(e.cesd11@v2) /// /* constrain residuals */
variance(e.cesd20@v3) /// /* constrain residuals */
variance(e.cesd02@v4) /// /* constrain residuals */
variance(e.cesd07@v5) /// /* constrain residuals */
mean(Somatic@m1) /* constrain factor means */
Endogenous variables
Measurement: cesd01 cesd02 cesd07 cesd11 cesd20
Exogenous variables
Latent: Somatic
Fitting target model:
Iteration 0: log likelihood = -13696.198 (not concave)
Iteration 1: log likelihood = -12625.682 (not concave)
Iteration 2: log likelihood = -12582.626
Iteration 3: log likelihood = -12552.249
Iteration 4: log likelihood = -12528.646
Iteration 5: log likelihood = -12527.916
Iteration 6: log likelihood = -12527.879
Iteration 7: log likelihood = -12527.879
Structural equation model Number of obs = 2252
Grouping variable = grp Number of groups = 2
Estimation method = ml
Log likelihood = -12527.879
( 1) [cesd01]1bn.grp#c.Somatic = 1
( 2) [cesd02]1bn.grp#c.Somatic - [cesd02]2.grp#c.Somatic = 0
( 3) [cesd07]1bn.grp#c.Somatic - [cesd07]2.grp#c.Somatic = 0
( 4) [cesd11]1bn.grp#c.Somatic - [cesd11]2.grp#c.Somatic = 0
( 5) [cesd20]1bn.grp#c.Somatic - [cesd20]2.grp#c.Somatic = 0
( 6) [var(e.cesd01)]1bn.grp - [var(e.cesd01)]2.grp = 0
( 7) [var(e.cesd02)]1bn.grp - [var(e.cesd02)]2.grp = 0
( 8) [var(e.cesd07)]1bn.grp - [var(e.cesd07)]2.grp = 0
( 9) [var(e.cesd11)]1bn.grp - [var(e.cesd11)]2.grp = 0
(10) [var(e.cesd20)]1bn.grp - [var(e.cesd20)]2.grp = 0
(11) [cesd01]1bn.grp = 0
(12) [cesd02]1bn.grp - [cesd02]2.grp = 0
(13) [cesd07]1bn.grp - [cesd07]2.grp = 0
(14) [cesd11]1bn.grp - [cesd11]2.grp = 0
(15) [cesd20]1bn.grp - [cesd20]2.grp = 0
(16) [mean(Somatic)]1bn.grp - [mean(Somatic)]2.grp = 0
(17) [cesd01]2.grp#c.Somatic = 1
(18) [cesd01]2.grp = 0
------------------------------------------------------------------------------
| OIM
| Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
Measurement |
cesd01 <- |
Somatic |
[*] | 1 (constrained)
_cons |
[*] | 0 (constrained)
-----------+----------------------------------------------------------------
cesd02 <- |
Somatic |
[*] | .9243261 .0599267 15.42 0.000 .806872 1.04178
_cons |
[*] | -.0540047 .0261998 -2.06 0.039 -.1053554 -.002654
-----------+----------------------------------------------------------------
cesd07 <- |
Somatic |
[*] | 1.702982 .0992192 17.16 0.000 1.508516 1.897448
_cons |
[*] | -.0425 .0421114 -1.01 0.313 -.1250368 .0400367
-----------+----------------------------------------------------------------
cesd11 <- |
Somatic |
[*] | 1.37989 .0859505 16.05 0.000 1.21143 1.54835
_cons |
[*] | .1531968 .0372876 4.11 0.000 .0801145 .2262791
-----------+----------------------------------------------------------------
cesd20 <- |
Somatic |
[*] | 1.466815 .0857704 17.10 0.000 1.298708 1.634922
_cons |
[*] | -.0460741 .0364502 -1.26 0.206 -.1175152 .025367
-------------+----------------------------------------------------------------
Mean |
Somatic |
[*] | .3297945 .0148722 22.18 0.000 .3006456 .3589434
-------------+----------------------------------------------------------------
Variance |
e.cesd01 |
[*] | .3755483 .0129791 .3509522 .4018683
e.cesd02 |
[*] | .3399106 .0116496 .3178278 .3635278
e.cesd07 |
[*] | .4782652 .0208425 .4391107 .5209111
e.cesd11 |
[*] | .5953331 .0212457 .5551153 .6384647
e.cesd20 |
[*] | .3709739 .0157399 .3413723 .4031425
Somatic |
1 | .11907 .0116526 .098288 .1442461
2 | .1458758 .0214926 .1092878 .1947129
------------------------------------------------------------------------------
Note: [*] identifies parameter estimates constrained to be equal across
groups.
LR test of model vs. saturated: chi2(24) = 134.38, Prob > chi2 = 0.0000
Next, we check the fit of model 5 versus model 4.
Finally, we will check for strict invariance with both factor means and variances constrained to be equal across groups.chi2 = 134.38 - 127.86 = 6.52 with df(24-23=1), p-value = .0106668
* model 6 -- strict invariance plus equal factor means & variances
sem (Somatic -> cesd01 cesd02 cesd07 cesd11 cesd20) ///
(1: Somatic -> cesd01@1) /// /* fix loading at 1 for group 1 */
(2: Somatic -> cesd01@1) /// /* fix loading at 1 for group 2 */
(cesd01 <- Somatic _cons@0) /// /* fix intercept at 0 both groups */
, group(grp) ///
variance(e.cesd01@v1) /// /* constrain residuals */
variance(e.cesd11@v2) /// /* constrain residuals */
variance(e.cesd20@v3) /// /* constrain residuals */
variance(e.cesd02@v4) /// /* constrain residuals */
variance(e.cesd07@v5) /// /* constrain residuals */
mean(Somatic@m1) /// /* constrain factor means */
variance(Somatic@v6) /* constrain factor variances */
Endogenous variables
Measurement: cesd01 cesd02 cesd07 cesd11 cesd20
Exogenous variables
Latent: Somatic
Fitting target model:
Iteration 0: log likelihood = -13636.745 (not concave)
Iteration 1: log likelihood = -12645.581 (not concave)
Iteration 2: log likelihood = -12588.687
Iteration 3: log likelihood = -12535.656 (not concave)
Iteration 4: log likelihood = -12530.377
Iteration 5: log likelihood = -12529.118
Iteration 6: log likelihood = -12529.105
Iteration 7: log likelihood = -12529.105
Structural equation model Number of obs = 2252
Grouping variable = grp Number of groups = 2
Estimation method = ml
Log likelihood = -12529.105
( 1) [cesd01]1bn.grp#c.Somatic = 1
( 2) [cesd02]1bn.grp#c.Somatic - [cesd02]2.grp#c.Somatic = 0
( 3) [cesd07]1bn.grp#c.Somatic - [cesd07]2.grp#c.Somatic = 0
( 4) [cesd11]1bn.grp#c.Somatic - [cesd11]2.grp#c.Somatic = 0
( 5) [cesd20]1bn.grp#c.Somatic - [cesd20]2.grp#c.Somatic = 0
( 6) [var(e.cesd01)]1bn.grp - [var(e.cesd01)]2.grp = 0
( 7) [var(e.cesd02)]1bn.grp - [var(e.cesd02)]2.grp = 0
( 8) [var(e.cesd07)]1bn.grp - [var(e.cesd07)]2.grp = 0
( 9) [var(e.cesd11)]1bn.grp - [var(e.cesd11)]2.grp = 0
(10) [var(e.cesd20)]1bn.grp - [var(e.cesd20)]2.grp = 0
(11) [var(Somatic)]1bn.grp - [var(Somatic)]2.grp = 0
(12) [cesd01]1bn.grp = 0
(13) [cesd02]1bn.grp - [cesd02]2.grp = 0
(14) [cesd07]1bn.grp - [cesd07]2.grp = 0
(15) [cesd11]1bn.grp - [cesd11]2.grp = 0
(16) [cesd20]1bn.grp - [cesd20]2.grp = 0
(17) [mean(Somatic)]1bn.grp - [mean(Somatic)]2.grp = 0
(18) [cesd01]2.grp#c.Somatic = 1
(19) [cesd01]2.grp = 0
------------------------------------------------------------------------------
| OIM
| Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
Measurement |
cesd01 <- |
Somatic |
[*] | 1 (constrained)
_cons |
[*] | 0 (constrained)
-----------+----------------------------------------------------------------
cesd02 <- |
Somatic |
[*] | .9235701 .0598179 15.44 0.000 .8063291 1.040811
_cons |
[*] | -.0537546 .0261636 -2.05 0.040 -.1050343 -.0024748
-----------+----------------------------------------------------------------
cesd07 <- |
Somatic |
[*] | 1.692658 .098248 17.23 0.000 1.500096 1.885221
_cons |
[*] | -.0390848 .0418017 -0.94 0.350 -.1210146 .042845
-----------+----------------------------------------------------------------
cesd11 <- |
Somatic |
[*] | 1.380176 .0858521 16.08 0.000 1.211909 1.548443
_cons |
[*] | .1531023 .0372545 4.11 0.000 .0800847 .2261198
-----------+----------------------------------------------------------------
cesd20 <- |
Somatic |
[*] | 1.467051 .0857967 17.10 0.000 1.298893 1.63521
_cons |
[*] | -.0461523 .0364472 -1.27 0.205 -.1175874 .0252829
-------------+----------------------------------------------------------------
Mean |
Somatic |
[*] | .3308145 .0148642 22.26 0.000 .3016811 .3599479
-------------+----------------------------------------------------------------
Variance |
e.cesd01 |
[*] | .375135 .0129755 .3505464 .4014483
e.cesd02 |
[*] | .3397284 .0116417 .3176604 .3633295
e.cesd07 |
[*] | .4813582 .020682 .442482 .52365
e.cesd11 |
[*] | .5944493 .0212324 .5542579 .6375552
e.cesd20 |
[*] | .3699995 .0157375 .3404053 .4021665
Somatic |
[*] | .1224343 .0117591 .1014263 .1477937
------------------------------------------------------------------------------
Note: [*] identifies parameter estimates constrained to be equal across
groups.
LR test of model vs. saturated: chi2(25) = 136.84, Prob > chi2 = 0.0000
The chi-square here is very close to the previous model.
It may be moot but the fit of model 6 is not significantly worst than the fit for model 5.chi2 = 136.84 - 134.38 = 2.46 with df(25-24=1), p-value = .11677878
In conclusion, we have evidence for metric invariance but not for any of the invariances higher in the invariance hierarchy.
Gregorich, S.E. 2006. Do Self-Report Instruments Allow Meaningful Comparisons Across Diverse Population Groups? Testing Measurement Invariance Using the Confirmatory Factor Analysis Framework. Medical Care, Volume 44, Number 11, Suppl 3.
UCLA Researchers are invited to our Statistical Consulting Services
We recommend others to our list of Other Resources for Statistical Computing Help
These pages are Copyrighted (c) by UCLA Academic Technology Services