15
d. Modification Indices
Diagnosing lack of fit in models is of critical importance. In classical SEM, model fit is
evaluated via discrepancies beween observed and model-implied covariances, which are
summarized using the above fit measures. Specific discrepancies are also of vital importance.
Again, there are two approaches.
summary(model.1.ests, modindices=TRUE)
which yields:
lhs op rhs mi epc sepc.lv sepc.all sepc.nox
1 y1 ~~ y1 0.000 0.000 0.000 0.000 0.000
2 y1 ~~ y2 20.468 -53.694 -53.694 -11.331 -11.331
3 y1 ~~ x1 NA NA NA NA NA
4 y1 ~~ x2 0.009 851.155 851.155 1642.024 851.155
5 y2 ~~ y2 0.000 0.000 0.000 0.000 0.000
6 y2 ~~ x1 20.419 48.615 48.615 0.424 48.615
7 y2 ~~ x2 20.468 49.621 49.621 2.010 49.621
8 x1 ~~ x1 0.000 0.000 0.000 0.000 0.000
9 x1 ~~ x2 0.000 0.000 0.000 0.000 0.000
10 x2 ~~ x2 0.000 0.000 0.000 0.000 0.000
11 y1 ~ y2 20.468 -0.287 -0.287 -13.657 -13.657
12 y1 ~ x1 0.000 0.000 0.000 0.000 0.000
13 y1 ~ x2 0.000 0.000 0.000 0.000 0.000
14 y2 ~ y1 0.000 0.000 0.000 0.000 0.000
15 y2 ~ x1 20.468 0.875 0.875 0.445 0.058
16 y2 ~ x2 0.000 0.000 0.000 0.000 0.000
17 x1 ~ y1 0.000 0.000 0.000 0.000 0.000
18 x1 ~ y2 17.594 0.224 0.224 0.440 0.440
19 x1 ~ x2 0.000 0.000 0.000 0.000 0.000
20 x2 ~ y1 0.000 0.000 0.000 0.000 0.000
21 x2 ~ y2 2.520 0.033 0.033 0.298 0.298
22 x2 ~ x1 0.000 0.000 0.000 0.000 0.000
Or we can get the same information using,
modindices(model.1.ests)
This second approach gives us some additional flexibility, for example we can extract only those
indices that suggest directed arrows be added (i.e., operator is ~).
mi <- modindices(model.1.ests)
print(mi[mi$op == "~",])
Now we only get the following: