> model <- '
+ # Direct effects
+ Supporttime2 ~ c1 * migratievermogen + c2 * Inschatten.algemeen
+ Supporttime1 ~ b1 * migratievermogen + b2 * Inschatten.algemeen
+
+ # Mediation effect
+ Supporttime2 ~ d * Supporttime1
+
+ # Moderation effects
+ Supporttime1 ~ m1 * migratievermogen_ordereffect
+ Supporttime1 ~ m2 * Inschatten.algemeen_ordereffect
+ Supporttime2 ~ i * Supporttime1_Information
+ '
> # Fit the model
> fit <- lavaan::sem(model, data = data_num)
> # Summarize the results
> summary(fit, standardized = TRUE)
lavaan 0.6.15 ended normally after 2 iterations
Estimator ML
Optimization method NLMINB
Number of model parameters 10
Used Total
Number of observations 413 414
Model Test User Model:
Test statistic 3.170
Degrees of freedom 3
P-value (Chi-square) 0.366
Parameter Estimates:
Standard errors Standard
Information Expected
Information saturated (h1) model Structured
Regressions:
Estimate Std.Err z-value P(>|z|) Std.lv
Supporttime2 ~
mgrtvrmgn (c1) -0.001 0.007 -0.070 0.944 -0.001
Inschttn. (c2) 0.014 0.007 1.830 0.067 0.014
Supporttime1 ~
mgrtvrmgn (b1) 0.041 0.023 1.747 0.081 0.041
Inschttn. (b2) -0.014 0.029 -0.479 0.632 -0.014
Supporttime2 ~
Supprttm1 (d) 1.001 0.018 55.640 0.000 1.001
Supporttime1 ~
mgrtvrmg_ (m1) 0.026 0.024 1.103 0.270 0.026
Inschtt._ (m2) -0.076 0.039 -1.951 0.051 -0.076
Supporttime2 ~
Spprtt1_I (i) -0.029 0.035 -0.811 0.417 -0.029
Std.all
-0.001
0.032
0.103
-0.035
0.943
0.099
-0.193
-0.014
Variances:
Estimate Std.Err z-value P(>|z|) Std.lv
.Supporttime2 0.129 0.009 14.370 0.000 0.129
.Supporttime1 0.955 0.066 14.370 0.000 0.955
Std.all
0.116
0.964
Best regards,
Farah