# NOT RUN {
#============================================================================
# Correct model (the model used to generate the data)
#============================================================================
model_correct <- "
# Structural model
eta2 ~ eta1
eta3 ~ eta1 + eta2
# Measurement model
eta1 =~ y11 + y12 + y13
eta2 =~ y21 + y22 + y23
eta3 =~ y31 + y32 + y33
"
a <- csem(threecommonfactors, model_correct)
## The overall model fit is evidently almost perfect:
testOMF(a, .R = 30, .verbose = FALSE) # .R = 30 to speed up the example
# }
Run the code above in your browser using DataLab