Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 201839

How do I add control variables when doing SEM in lavaan R?

$
0
0

I was wondering if there is a function to add control variables when doing SEM in lavaan conveniently in R?

I would like to test the mediation effect of WE between OSE and IWB. However, if there is another variable Z (e.g. age or gender) that correlates with WE and IWB, it creates a link - thus, creating correlation between the WE and IWB. I believe I would need to control for it in order to avoid the bias of the WE effect as a mediator.


Viewing all articles
Browse latest Browse all 201839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>