n_obs = 100
corr = 0.1
effect = 0.12
ld = c(1,1,1,1)
alp = 0.9
data = generate_data(n_obs, corr, effect, ld, alp)
model = "
fy =~ y1 + y2 + y3 + y4
fx =~ x1 + x2 + x3 + x4
fz =~ z1 + z2 + z3 + z4
fy ~ fx + fz + fx:fz
"
fit = silp(model, data)
resilp(fit, R = 10)
Run the code above in your browser using DataLab