I fitted Structural Equation Modeling using lavaan package in R, and the model contains interaction terms.
I want to create an interaction plot and check simple slopes, but there is no package supporting it. So I used this website (http://www.quantpsy.org/interact/mlr2.htm) which manually computes simple slopes and generates interaction plots.
I put the values on the website using regression coefficients in lavaan outpupt.
```
Regressions:
Estimate Std.Err z-value P(>|z|)
x ~
a1 (A) 0.407 0.052 7.898 0.000
a2 (E) 0.304 0.046 6.548 0.000
a3 (c1) -0.157 0.045 -3.464 0.001
a4 (c2) 0.066 0.042 1.559 0.119
a5 (c3) -0.041 0.045 -0.912 0.362
a6 (c31) -0.019 0.044 -0.421 0.673
z (c32) 0.093 0.050 1.858 0.063
a7 (c34) 0.037 0.042 0.872 0.383
y ~
int (I) 0.296 0.113 2.617 0.009
x (F) -0.130 0.150 -0.865 0.387
z (G) 0.289 0.161 1.794 0.073
a3 (c4) -0.434 0.131 -3.316 0.001
a4 (c5) -0.053 0.119 -0.442 0.659
a5 (c6) 0.260 0.129 2.005 0.045
a6 (c9) 0.154 0.123 1.248 0.212
a8 (c10) 0.209 0.159 1.317 0.188
a7 (c11) 0.207 0.124 1.664 0.096
a1 (c13) 0.636 0.163 3.907 0.000
Intercepts:
Estimate Std.Err z-value P(>|z|)
.x -0.027 0.042 -0.650 0.516
```
Coefficient variances from ```vcor()``` function are:
b0: 0.002
b1: 0.022
b3: 0.026
b3: 0.013
b2, b0: 0.000
b3, b1: 0.000
Finally, the output using the website:
```
TWO-WAY INTERACTION SIMPLE SLOPES OUTPUT
Your Input
=======================================================
X1 = -2
X2 = 2
cv1 = -1
cv2 = 0
cv3 = 1
Intercept = 0.492
X Slope = -0.13
Z Slope = 0.289
XZ Slope = 0.296
df = 3
alpha = 0.05
Asymptotic (Co)variances
=======================================================
var(b0) 0.002
var(b1) 0.022
var(b2) 0.026
var(b3) 0.013
cov(b2,b0) 0
cov(b3,b1) 0
Region of Significance
=======================================================
Z at lower bound of region = Imaginary
Z at upper bound of region = Imaginary
Simple Intercepts and Slopes at Conditional Values of Z
=======================================================
At Z = cv1...
simple intercept = 0.203(0.1673), t=1.2132, p=0.3119
simple slope = -0.426(0.1871), t=-2.2771, p=0.1072
At Z = cv2...
simple intercept = 0.492(0.0447), t=11.0015, p=0.0016
simple slope = -0.13(0.1483), t=-0.8765, p=0.4453
At Z = cv3...
simple intercept = 0.781(0.1673), t=4.6674, p=0.0186
simple slope = 0.166(0.1871), t=0.8873, p=0.4403
Simple Intercepts and Slopes at Region Boundaries
=======================================================
Lower Bound...
simple intercept = NaN(NaN), t=NaN, p=NaN
simple slope = NaN(NaN), t=NaN, p=NaN
Upper Bound...
simple intercept = NaN(NaN), t=NaN, p=NaN
simple slope = NaN(NaN), t=NaN, p=NaN
Points to Plot
=======================================================
Line for cv1: From {X=-2, Y=1.055} to {X=2, Y=-0.649}
Line for cv2: From {X=-2, Y=0.752} to {X=2, Y=0.232}
Line for cv3: From {X=-2, Y=0.449} to {X=2, Y=1.113}
```
However, the results show that none of the slopes is significant, which does not match my original findings. Anyone knows why it happens?
Anyone knows why it happens?
Your Input
=======================================================
X1 = -2
X2 = 2
cv1 = -1
cv2 = 0
cv3 = 1
Intercept = 0.492
X Slope = -0.13
Z Slope = 0.289
XZ Slope = 0.296
df = 3
alpha = 0.05