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
.