Hi,
When i try to run a model to test a mediation effect of a variable called vulnerability (vul), but controlling on socioeconomic (gse_ac3) and economical tightness (estrechez), somehow my model stop showing GOF's
modelo_simple2 <- "# direct effect
k6_2 ~ c*vul + gse_ac3 + estrechez
# mediator
NAQ_sum ~ a*vul + gse_ac3 + estrechez
k6_2 ~ b*NAQ_sum
#indirect effect (a*b)
ab := a*b
total effect:= c + (a*b)
"
set.seed(1234)
SEM2 <- sem(modelo_simple2, data=BD_13_02_19, estimator="MLR")
semPaths(SEM2, what="paths", whatLabels="par", layout="tree", thresholds=F, intercepts=F)
summary(SEM2, fit.measures=TRUE, standardize=TRUE, rsquare=TRUE)
fitMeasures(SEM2)
ajusteAFC(SEM2)
Optimization method NLMINB
Number of free parameters 9
Used Total
Number of observations 1914 1995
Estimator ML Robust
Model Fit Test Statistic 0.000 0.000
Degrees of freedom 0 0
Minimum Function Value 0.0000000000000
Scaling correction factor NA
for the Yuan-Bentler correction (Mplus variant)
Model test baseline model:
Minimum Function Test Statistic 685.079 476.844
Degrees of freedom 7 7
P-value 0.000 0.000
User model versus baseline model:
Comparative Fit Index (CFI) 1.000 1.000
Tucker-Lewis Index (TLI) 1.000 1.000
Robust Comparative Fit Index (CFI) NA
Robust Tucker-Lewis Index (TLI) NA
What i'm trying to find if the effect of vulnerability over k2 (psychollogical distress scores) and the mediating effect (Workplace Violence scores), controlling on these 2 variables. Unfortunatedly, i only get results from this model:
modelo_simple2 <- "# direct effect
k6_2 ~ c*vul
# mediator
NAQ_sum ~ a*vul + gse_ac3 + estrechez
k6_2 ~ b*NAQ_sum
#indirect effect (a*b)
ab := a*b
total effect:= c + (a*b)
lavaan 0.6-3 ended normally after 46 iterations
Optimization method NLMINB
Number of free parameters 7
Used Total
Number of observations 1914 1995
Estimator ML Robust
Model Fit Test Statistic 23.972 21.018
Degrees of freedom 2 2
P-value (Chi-square) 0.000 0.000
Scaling correction factor 1.141
for the Yuan-Bentler correction (Mplus variant)
Model test baseline model:
Minimum Function Test Statistic 685.079 476.844
Degrees of freedom 7 7
P-value 0.000 0.000
User model versus baseline model:
Comparative Fit Index (CFI) 0.968 0.960
Tucker-Lewis Index (TLI) 0.887 0.858
Robust Comparative Fit Index (CFI) 0.968
Robust Tucker-Lewis Index (TLI) 0.888
Is there a problem on how I'm specifying the variables?