O'Reilly logo

Mastering Scientific Computing with R by Radia M. Johnson, Paul Gerrard

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Comparing OpenMx to lavaan

It can be seen that lavaan has a much simpler syntax that allows to rapidly model basic SEM models. However, we were a bit unfair to OpenMx because we used a path model specification for lavaan and a matrix specification for OpenMx. The truth is that OpenMx is still probably a bit wordier than lavaan, but let's apply a path model specification in each to do a fair head-to-head comparison.

We will use the famous Holzinger-Swineford 1939 dataset here from the lavaan package to do our modeling, as follows:

hs.dat <- HolzingerSwineford1939

We will create a new dataset with a shorter name so that we don't have to keep typing HozlingerSwineford1939.

Explaining an example in lavaan

We will learn to fit the Holzinger-Swineford model ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required