Modification indices can be requested by adding the argument modindices = TRUE in the summary() call, or by calling the function modindices() directly. By default, modification indices are printed out for each nonfree (or fixed-to-zero) parameter. The modification indices are supplemented by the expected parameter change (EPC) values (column epc). The last three columns contain the standardized EPC values (sepc.lv: only standardizing the latent variables; sepc.all: standardizing all variables; sepc.nox: standardizing all but exogenous observed variables).
A typical use of the modindices() function is as follows:
fit <-cfa(HS.model,data = HolzingerSwineford1939)modindices(fit, sort =TRUE, maximum.number =5)
This will print out the top 5 parameters (that can be added to the model) that result in the largest modification index, sorted from high to low.
The modindices() function returns a data frame, which you can sort or filter to extract what you want. For example, to see only the modification indices for the factor loadings, you can use something like this:
fit <-cfa(HS.model, data = HolzingerSwineford1939)mi <-modindices(fit)mi[mi$op =="=~",]
It is important to realize that the modindices() function will only consider fixed-to-zero parameters. If you have equality constraints in the model, and you wish to examine what happens if you release all (or some) of these equality constraints, use the lavTestScore() function.