N <- 483
m_true <- "
lifeSatisfaction ~ .05*attachment + .25*selfEsteem + .40*parentalSupport + .30*salary
selfEsteem ~ .40*parentalSupport + .20*attachment
attachment ~~ .30*parentalSupport
"
m_fit <- "
lifeSatisfaction ~ selfEsteem + salary # omits some true predictors
selfEsteem ~ parentalSupport + attachment
# attachment ~~ parentalSupport # (omitted on purpose)
"
E2 <- simulateData(m_true, sample.nobs = N, seed = 12)
fit <- sem(m_fit, data = E2, meanstructure = TRUE)


