* Constraints, covariance structure, LR tests, modification indices * Data for a two factor measurement model infile x1-x6 using "Z:\PUBLIC_WEB\MPlus\Basics\CFA and MIMIC\ex5.1.dat" sem (x1-x6) // covariance model sem (L1 -> x1-x3) (L2 -> x4-x6) // everything varies // Testing invariance within factor 1 sem (L1 -> x1-x3) estimates store congeneric // Tau-equivalent, all loadings equal // a unit change on one measure is equal to that on another sem (L1@a -> x1-x3) // also written (L1 -> x1@a x2@a x3@a), or as three separate paths lrtest . congeneric estimates store tauequivalent // Scale-equivalent, all loadings are equal and the means are equal // scores are the same but precision is not sem (L1@a _cons@c -> x1-x3) // here again, we might write this as (L1@b -> x1-x3)(_cons@a -> x1-x3) estimates store L1scalar // Side track: equal residuals sem (L1@a -> x1-x3), var(e.x1@b e.x2@b e.x3@b ) // same as above sem (L1@a -> x1-x3), covstructure(e._OEn, identity) // strict invariance, each measure scores the same, with the same precision sem (L1@a _cons@c -> x1-x3), covstructure(e._OEn, identity) estimates store L1strict // a series of LR tests lrtest L1strict L1scalar lrtest L1strict L1tauequivalent lrtest L1strict L1congeneric // strict invariance works here // Testing invariance within factor 2 sem (L2 -> x4-x6) estimates store L2congeneric sem (L2@a -> x4-x6) estimates store L2tauequivalent sem (L2@a _cons@c -> x4-x6) estimates store L2scalar sem (L2@a _cons@c -> x4-x6), covstructure(e._OEn, identity) estimates store L2strict lrtest L2strict L2scalar // not equivalent estimates table L2strict L2scalar lrtest L2scalar L2tauequivalent lrtest L2scalar L2congeneric // We have scalar equivalence. Each measure is expected to // produce the same score, but not equally reliably // We can try to narrow down what is variable by looking // at modification indices estimates restore L2strict estat mindices // Once we get to the scalar model, no improvement is suggested // Note how the change already made eliminated the loading change // indicated. estimates restore L2scalar estat mindices