Lavaan Error in JASP - SEM
Hello,
I am completely new to code and structural equation modelling.
I am investigating relationships between mindfulness, psychological capital, stress and several workplace outcomes (engagement, burnout, turnover and job satisfaction)
This is the code I am trying to use:
Mind =~ Q1_1 + Q1_2 + Q1_3 + Q1_4 + Q1_5 + Q1_6 + Q1_7 + Q1_8 + Q1_9 + Q1_10 + Q1_11 + Q1_12 + Q1_13 + Q1_14 + Q1_15
Psycap =~ Q2_1 + Q2_2 + Q2_3 + + Q2_4 + Q2_5 + Q2_6 + Q2_7 + Q2_8 + Q2_9 + Q2_10 + Q2_11 + Q2_12 + Q2_1_A + Q2_2_A + Q2_3_A + Q2_4_A + Q2_5_A + Q2_6_A + Q2_7_A + Q2_8_A + Q2_9_A + Q2_10_A + Q2_11_A + Q2_12_A
Stress =~ Q3_1 + Q3_2 + Q3_3 + Q3_4 + Q3_5 + Q3_6 + Q3_7 + Q3_8
Eng =~ Q5_1 + Q5_2 + Q5_3 + Q5_4 + Q5_5 + Q5_6 + Q5_7 + Q5_8 + Q5_9
# regressions
Eng ~ Psycap + Stress + Mind
Psycap ~ Mind
I am getting the following warning message:
lavaan error unordered factor(s) detected make them numeric or ordered
Could you please help me with this?
Thanks a lot!
Comments
Some of your variables in the data view are ordinal instead of scale:
Click on the icon:
Select scale:
Do this for all the variables in your model, you will need to re-run the analysis, possibly recreate the SEM analysis
Thank you a lot! It is working now.