I've been trying to get the SEM bellow to converge for a while now and today I finally did it (and with a decent fit).
I double checked the standard errors, scale and correlation structure of all of my variables and I could not find anything obvious that needs fixing, so here I am.
I would really appreciate any help I can get on this. These models (this one and the other ones I'm running) are a good chunk of my thesis and I can't get this one to work.
Model syntax, functions I ran and summary are copied bellow. I am also happy to share my data if it will help figuring out what is happening.
In the model above, alll variables are continuous apart from Biome, which is categorical and has two levels.
- Running the following function generates the error message displayed bellow: fit.model1 <- lavaan::sem(model1, data=dat1, fixed.x = F)
- Getting the summary: summary(fit.savfor.BRA_new, fit.measures=TRUE, standardized=TRUE)
lavaan (0.5-23.1097) converged normally after 408 iterations
Number of observations 66
Estimator ML
Minimum Function Test Statistic 15.508
Degrees of freedom 15
P-value (Chi-square) 0.415
Model test baseline model:
Minimum Function Test Statistic 79.879
Degrees of freedom 28
P-value 0.000
User model versus baseline model:
Comparative Fit Index (CFI) 0.990
Tucker-Lewis Index (TLI) 0.982
Loglikelihood and Information Criteria:
Loglikelihood user model (H0) NA
Loglikelihood unrestricted model (H1) NA
Number of free parameters 21
Akaike (AIC) NA
Bayesian (BIC) NA
Root Mean Square Error of Approximation:
RMSEA 0.023
90 Percent Confidence Interval 0.000 0.120
P-value RMSEA <= 0.05 0.580
Standardized Root Mean Square Residual:
SRMR 0.091
Parameter Estimates:
Information Expected
Standard Errors Standard
Latent Variables:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
soil =~
SandLOG 1.000 NaN NaN
P.totalLOG 2.350 1.272 1.847 0.065 NaN NaN
Al.cmol. 3.273 1.668 1.962 0.050 NaN NaN
SB 7.947 4.081 1.947 0.052 NaN NaN
climate =~
DroughtLOG 1.000 0.060 0.053
mapLOG 0.219 0.158 1.381 0.167 0.013 0.064
fire =~
FireLOG 1.000 1.074 1.000
Regressions:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
soil ~
climate 1.371 4.367 0.314 0.754 NaN NaN
fire ~
climate 8.214 16.085 0.511 0.610 0.462 0.462
Biome ~
climate 27.362 100.461 0.272 0.785 1.651 3.403
soil 3.928 9.173 0.428 0.668 NaN NaN
fire -0.973 2.254 -0.432 0.666 -1.044 -2.153
Covariances:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
.P.totalLOG ~~
.SB 0.966 0.554 1.743 0.081 0.966 0.366
.SB ~~
.FireLOG -0.675 0.380 -1.774 0.076 -0.675 -Inf
Variances:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
.SandLOG 0.314 0.062 5.037 0.000 0.314 1.107
.P.totalLOG 0.958 0.234 4.098 0.000 0.958 1.212
.Al.cmol. 1.033 0.320 3.227 0.001 1.033 1.461
.SB 7.267 2.029 3.581 0.000 7.267 1.359
.DroughtLOG 1.292 0.225 5.749 0.000 1.292 0.997
.mapLOG 0.042 0.007 5.743 0.000 0.042 0.996
.FireLOG 0.000 0.000 0.000
.Biome -2.280 9.770 -0.233 0.816 -2.280 -9.685
.soil -0.037 0.033 -1.141 0.254 NaN NaN
climate 0.004 0.014 0.251 0.801 1.000 1.000
.fire 0.907 0.848 1.069 0.285 0.787 0.787
I was also given the following warning message:
Warning messages:
1: In sqrt(ETA2) : NaNs produced
2: In sqrt(ETA2) : NaNs produced
3: In sqrt(ETA2) : NaNs produced
Thank you for your time and attention.