Hello,
I post the following question also in this group:
I’m working on my degree thesis and I’m using R package “Lavaan” and the SimulateData () function to simulate data from this model:
Model <- '
f1 =~ V1 + V2 + V3 + V4 + V5 + V6 + V7 + V8 + V9 + 0.2*V10 + 0.2*V11 + 0.2*V12 + 0.2*V13 + 0.2*V14 + 0.2*V15
f2 =~ V16 + V17 + V18 + V19 + V20 + V21 + V22 +V23 + V24 + 0.2*V25 + 0.2*V26 + 0.2*V27 + 0.2*V28 + 0.2*V29 + 0.2*V30
f3 =~ V31 + V32 + V33 + V34 + V35 + V36 + V37 + V38 + V39 + 0.2*V40 + 0.2*V41 + 0.2*V42 + 0.2*V43 + 0.2*V44 + 0.2*V45
O1 ~ 1*f1 + 0.2*f2 + 0.2*f3 '
The observed variables and the criterion variable O1 should be dichotomous.
I know that the "|" operator can be used to define the thresholds of categorical endogenous variables, but how should I choose the threshold values? Does this way work for the criterion variable? Is it possible to simulate dichotomous data in Lavaan?
Thanks for any help,
Monica
to simulate data from this model:
Model <- '
f1 =~ V1 + V2 + V3 + V4 + V5 + V6 + V7 + V8 + V9 + 0.2*V10 + 0.2*V11 + 0.2*V12 + 0.2*V13 + 0.2*V14 + 0.2*V15
f2 =~ V16 + V17 + V18 + V19 + V20 + V21 + V22 +V23 + V24 + 0.2*V25 + 0.2*V26 + 0.2*V27 + 0.2*V28 + 0.2*V29 + 0.2*V30
f3 =~ V31 + V32 + V33 + V34 + V35 + V36 + V37 + V38 + V39 + 0.2*V40 + 0.2*V41 + 0.2*V42 + 0.2*V43 + 0.2*V44 + 0.2*V45
O1 ~ 1*f1 + 0.2*f2 + 0.2*f3 '
The observed variables and the criterion variable O1 should be dichotomous.
I know that the "|" operator can be used to define the thresholds of categorical endogenous variables, but how should I choose the threshold values?