Hi,
I am new to lavaan and to SEM. Despite a read quite a lot of things, I probably missed a bunch of things and need some experts' help/advice. So, I ask several questions in this. mesage and I hope it is okay.
I pre-registered a study, planning to run 3 models, from the more simple to the more complex. I have 237 participants.
The first model (with 3 latent variables, and this kind of regression between the variables : SchoolPart ~ EF + CCC) has quite a good fit (RMSEA =.066, CFI = .96) when I added 5 correlations suggested by MI and relevant according to the theory (is it ok to do that?) .
Nevertheless, the X square was significant, but multivariate normality is violated in my data, so I assume that could be a reaosn for the inflation of the model chi square; is that right and can my model still be ok?.
Then, i wanted to run a more complex model, with mediation. I started with my previous improved model (is it ok to do that or was I supposed to remove the added correlations first? ).
Here is the model and its graphical representation is attached (the plot does not include correlations). Is my model in line with the plot (I did not find many example and was not sure I example are usally more simple)?
modSEM2 <- '
#measurment model
EF =~ Brief_Init + Brief_WM + Brief_PlanOrga + Brief_Monit + Brief_Inhib + Brief_Flexi + Brief_EmoCont
CCC =~ CCC_Com + CCC_SocialRelat + CCC_Interests
SchoolPart =~ SchoolAttendanceScore + NbScolPart + ScolInvolv
# regressions
EF ~ p3*Sex + p8*Age
CCC ~ p7*Sex + p5*Age
SchoolPart ~ p4*EF + p6*CCC + p1*Sex + p2*Age + HighestParEduc
# Indirect effects
ind1 := p3*p4 + p7*p6
total1:= p1+ p3*p4 + p7*p6
ind2 := p5*p6 + p8*p4
total2:= p2 + p5*p6 + p8*p4
# correlations
Brief_EmoCont ~~Brief_Inhib + Brief_Flexi
Brief_PlanOrga ~~ Brief_Monit
Brief_Flexi ~~ CCC_Interests
Brief_Init ~~ Brief_Inhib
'
fitSEM2 <- sem (modSEM2, data = DFsem2, estimator = "MLR", fixed.x=FALSE)
summary(fitSEM2, fit.measures = TRUE, standardized = TRUE, modindices = TRUE, rsq = TRUE)
This time, the fit (CFI) is not very good (see below) AND I have a warning message indicating
« Warning message:
In lav_object_post_check(object) :
lavaan WARNING: some estimated ov variances are negative »
(which seems to be for CCC_SocialRelat).
Here is my main question: Where does this negative variance come from (I probably did something wrong…?) and what would you suggest to do ?
Your help and expertise would be greatly appreciated ,
Best,
Adeline
lavaan 0.6.15 ended normally after 204 iterations
Estimator ML
Optimization method NLMINB
Number of model parameters 46
Used Total
Number of observations 214 235
Model Test User Model:
Standard Scaled
Test Statistic 254.788 249.814
Degrees of freedom 90 90
P-value (Chi-square) 0.000 0.000
Scaling correction factor 1.020
Yuan-Bentler correction (Mplus variant)
Model Test Baseline Model:
Test statistic 1528.669 1467.011
Degrees of freedom 117 117
P-value 0.000 0.000
Scaling correction factor 1.042
User Model versus Baseline Model:
Comparative Fit Index (CFI) 0.883 0.882
Tucker-Lewis Index (TLI) 0.848 0.846
Robust Comparative Fit Index (CFI) 0.884
Robust Tucker-Lewis Index (TLI) 0.849
Loglikelihood and Information Criteria:
Loglikelihood user model (H0) -7517.595 -7517.595
Scaling correction factor 0.987
for the MLR correction
Loglikelihood unrestricted model (H1) NA NA
Scaling correction factor 1.009
for the MLR correction
Akaike (AIC) 15127.191 15127.191
Bayesian (BIC) 15282.026 15282.026
Sample-size adjusted Bayesian (SABIC) 15136.263 15136.263
Root Mean Square Error of Approximation:
RMSEA 0.092 0.091
90 Percent confidence interval - lower 0.079 0.078
90 Percent confidence interval - upper 0.106 0.104
P-value H_0: RMSEA <= 0.050 0.000 0.000
P-value H_0: RMSEA >= 0.080 0.940 0.918
Robust RMSEA 0.092
90 Percent confidence interval - lower 0.079
90 Percent confidence interval - upper 0.106
P-value H_0: Robust RMSEA <= 0.050 0.000
P-value H_0: Robust RMSEA >= 0.080 0.930
Standardized Root Mean Square Residual:
SRMR 0.144 0.144
Parameter Estimates:
Standard errors Sandwich
Information bread Observed
Observed information based on Hessian
Latent Variables:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
EF =~
Brief_Init 1.000 2.716 0.780
Brief_WM 1.490 0.113 13.187 0.000 4.047 0.846
Brief_PlanOrga 1.699 0.131 12.944 0.000 4.614 0.817
Brief_Monit 0.955 0.082 11.652 0.000 2.593 0.765
Brief_Inhib 1.644 0.121 13.615 0.000 4.465 0.838
Brief_Flexi 0.885 0.083 10.713 0.000 2.403 0.631
Brief_EmoCont 1.212 0.116 10.451 0.000 3.292 0.608
CCC =~
CCC_Com 1.000 4.917 0.292
CCC_SocialRelt 0.952 0.625 1.523 0.128 4.681 1.276
CCC_Interests 0.126 0.033 3.843 0.000 0.622 0.242
SchoolPart =~
SchlAttndncScr 1.000 0.551 0.463
NbScolPart 1.982 0.391 5.075 0.000 1.092 0.786
ScolInvolv 2.180 0.507 4.302 0.000 1.201 0.848
Regressions:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
EF ~
Sex (p3) 0.970 0.542 1.789 0.074 0.357 0.142
Age (p8) 1.177 0.392 3.000 0.003 0.433 0.216
CCC ~
Sex (p7) 1.512 0.959 1.577 0.115 0.308 0.122
Age (p5) 1.011 0.826 1.224 0.221 0.206 0.103
SchoolPart ~
EF (p4) -0.005 0.020 -0.222 0.825 -0.022 -0.022
CCC (p6) 0.029 0.010 2.880 0.004 0.257 0.257
Sex (p1) 0.027 0.120 0.229 0.819 0.050 0.020
Age (p2) 0.137 0.094 1.448 0.148 0.248 0.124
HghstPrEd 0.004 0.021 0.203 0.839 0.008 0.014
Covariances:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
.Brief_Flexi ~~
.Brief_EmoCont 5.401 0.945 5.714 0.000 5.401 0.425
.Brief_Inhib ~~
.Brief_EmoCont 5.240 1.028 5.095 0.000 5.240 0.420
.Brief_PlanOrga ~~
.Brief_Monit 2.519 0.617 4.082 0.000 2.519 0.355
.Brief_Flexi ~~
.CCC_Interests -1.948 0.452 -4.312 0.000 -1.948 -0.265
.Brief_Init ~~
.Brief_Inhib -2.052 0.561 -3.658 0.000 -2.052 -0.325
Sex ~~
Age 0.031 0.013 2.352 0.019 0.031 0.156
HighestParEduc 0.001 0.051 0.026 0.979 0.001 0.002
Age ~~
HighestParEduc -0.018 0.063 -0.292 0.770 -0.018 -0.020
Variances:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
.Brief_Init 4.741 0.659 7.199 0.000 4.741 0.391
.Brief_WM 6.513 0.912 7.139 0.000 6.513 0.285
.Brief_PlanOrga 10.580 1.293 8.182 0.000 10.580 0.332
.Brief_Monit 4.763 0.588 8.105 0.000 4.763 0.415
.Brief_Inhib 8.431 1.154 7.307 0.000 8.431 0.297
.Brief_Flexi 8.732 0.915 9.544 0.000 8.732 0.602
.Brief_EmoCont 18.469 1.625 11.365 0.000 18.469 0.630
.CCC_Com 260.233 25.750 10.106 0.000 260.233 0.915
.CCC_SocialRelt -8.454 12.072 -0.700 0.484 -8.454 -0.628
.CCC_Interests 6.208 0.636 9.765 0.000 6.208 0.941
.SchlAttndncScr 1.112 0.139 7.985 0.000 1.112 0.786
.NbScolPart 0.740 0.157 4.705 0.000 0.740 0.383
.ScolInvolv 0.565 0.194 2.913 0.004 0.565 0.282
.EF 6.812 1.021 6.669 0.000 0.923 0.923
.CCC 23.470 18.917 1.241 0.215 0.971 0.971
.SchoolPart 0.276 0.117 2.358 0.018 0.910 0.910
Sex 0.158 0.016 9.564 0.000 0.158 1.000
Age 0.249 0.002 111.566 0.000 0.249 1.000
HighestParEduc 3.445 0.214 16.069 0.000 3.445 1.000
R-Square:
Estimate
Brief_Init 0.609
Brief_WM 0.715
Brief_PlanOrga 0.668
Brief_Monit 0.585
Brief_Inhib 0.703
Brief_Flexi 0.398
Brief_EmoCont 0.370
CCC_Com 0.085
CCC_SocialRelt NA
CCC_Interests 0.059
SchlAttndncScr 0.214
NbScolPart 0.617
ScolInvolv 0.718
EF 0.077
CCC 0.029
SchoolPart 0.090
Defined Parameters:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
ind1 0.039 0.039 1.002 0.317 0.071 0.028
total1 0.067 0.122 0.546 0.585 0.121 0.048
ind2 0.024 0.038 0.624 0.532 0.043 0.022
total2 0.160 0.088 1.823 0.068 0.291 0.145
# correlations
Brief_EmoCont ~~Brief_Inhib + Brief_Flexi
Brief_PlanOrga ~~ Brief_Monit
Brief_Flexi ~~ CCC_Interests
Brief_Init ~~ Brief_Inhib
'