categorical exogenous variable in mediation of path analysis and their interpretation

203 views
Skip to first unread message

7996...@qq.com

unread,
Mar 10, 2019, 7:40:09 AM3/10/19
to lavaan
Hi all,

My name is Edward and I am new to lavaan and path analysis. I got a warning message which makes me confused about if my codes are correct. After checking several textbooks I still haven't found possible solutions to my questions.

I currently have 4860 data points and my model is to test if students' confidence can mediate the influence of e-learning use, time spent on study and class test performance on final exam test. My research story is as follows.  E-learning is a binary variable, with using as 1 and not using as 0. Time spent on study is three-level variable, with 1,3,5 days spent on study per week, and In-class test is also a three-level with good, pass and fail on the test performance. Confidence level is a continuous variable, ranging from 0~100% with 100% feeling completely confident on final exam and final exam score is a continuous variable ranging from 0~16 with 16 is 100% correct. 
Capture.PNG
As all my exogenous variables are categorical, I use dummy coding to variables, making e-learning a binary variable, coding the time_spent as two dummy variables with 1 day as reference, and coding in-class test performance as two dummy variables with fail as reference. Then I use lavaan and got a warning message, and I don't know if I make it wrong:
Capture2.PNG

Warning message:
In lav_data_full(data = data, group = group, cluster = cluster,  :
  lavaan WARNING: some observed variances are (at least) a factor 1000 times larger than others; use varTable(fit) to investigate

Finally, my result is as follows, and I don't know how to interpret them. My hypothesis is students' confidence can mediate the influence of e-learning use, time spent on study and class test performance on final exam test, and I don't know if it is supported or rejected.
Capture3.PNG
Any suggestion and help are welcome. Many thanks ahead!

Edward



Christopher Desjardins

unread,
Mar 10, 2019, 1:28:09 PM3/10/19
to lav...@googlegroups.com
Confidence and test_score have very different scales. If you put them on the same scale using scale() the message would go away. You can z-transform them both with that function and it will go away. 


On Mar 10, 2019, at 6:40 AM, 7996...@qq.com wrote:

Hi all,

My name is Edward and I am new to lavaan and path analysis. I got a warning message which makes me confused about if my codes are correct. After checking several textbooks I still haven't found possible solutions to my questions.

I currently have 4860 data points and my model is to test if students' confidence can mediate the influence of e-learning use, time spent on study and class test performance on final exam test. My research story is as follows.  E-learning is a binary variable, with using as 1 and not using as 0. Time spent on study is three-level variable, with 1,3,5 days spent on study per week, and In-class test is also a three-level with good, pass and fail on the test performance. Confidence level is a continuous variable, ranging from 0~100% with 100% feeling completely confident on final exam and final exam score is a continuous variable ranging from 0~16 with 16 is 100% correct. 
<Capture.PNG>
As all my exogenous variables are categorical, I use dummy coding to variables, making e-learning a binary variable, coding the time_spent as two dummy variables with 1 day as reference, and coding in-class test performance as two dummy variables with fail as reference. Then I use lavaan and got a warning message, and I don't know if I make it wrong:
<Capture2.PNG>

Warning message:
In lav_data_full(data = data, group = group, cluster = cluster,  :
  lavaan WARNING: some observed variances are (at least) a factor 1000 times larger than others; use varTable(fit) to investigate

Finally, my result is as follows, and I don't know how to interpret them. My hypothesis is students' confidence can mediate the influence of e-learning use, time spent on study and class test performance on final exam test, and I don't know if it is supported or rejected.
<Capture3.PNG>
Any suggestion and help are welcome. Many thanks ahead!

Edward



--
You received this message because you are subscribed to the Google Groups "lavaan" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lavaan+un...@googlegroups.com.
To post to this group, send email to lav...@googlegroups.com.
Visit this group at https://groups.google.com/group/lavaan.
For more options, visit https://groups.google.com/d/optout.
<Capture.PNG>
<Capture2.PNG>
<Capture3.PNG>

Edward Wong

unread,
Mar 13, 2019, 8:47:36 AM3/13/19
to lavaan
Thanks so much Christopher! It really helps!
Do you also know if it is correct that I use as.factor() to all my dummy coded variables? Thanks ahead:)

Christopher Desjardins

unread,
Mar 13, 2019, 9:27:20 AM3/13/19
to lav...@googlegroups.com
You should set up dummy variables that aren’t factors but numeric variables 

Edward Wong

unread,
Mar 13, 2019, 5:48:33 PM3/13/19
to lavaan
Thanks so much!
Reply all
Reply to author
Forward
0 new messages