In this video, I will demonstrate how to do structural equation modeling in free software JASP. Useful links:
JASP: [ Ссылка ]
Source 1: [ Ссылка ]
Source 2: [ Ссылка ]
Code 1
# latent variables
ind60 =~ x1 + x2 + x3
dem60 =~ y1 + y2 + y3 + y4
dem65 =~ y5 + y6 + y7 + y8
# regressions
dem60 ~ ind60
dem65 ~ ind60 + dem60
# residual covariances
y1 ~~ y5
y2 ~~ y4 + y6
y3 ~~ y7
y4 ~~ y8
y6 ~~ y8
Code2
# latent variables
ind60 =~ x1 + x2 + x3
dem60 =~ y1 + y2 + y3 + y4
dem65 =~ y5 + y6 + y7 + y8
# regressions
dem60 ~ alpha*ind60
dem65 ~ direct*ind60 + beta*dem60
# effects of interest
indirect := alpha * beta
total := indirect + direct
proportion := indirect/total
# residual covariances
y1 ~~ y5
y2 ~~ y4 + y6
y3 ~~ y7
y4 ~~ y8
y6 ~~ y8
![](https://s2.save4k.ru/pic/fno5LC5cKdM/maxresdefault.jpg)