Hello!!
I have a problem running a piece of code in markdown. My code is:
m2= 'lnmath ~ G*gender + B31*lang + B32*enjoy
enjoy ~ V21*gender
lang~ V11*gender
ind:= V21*B31 + V11*B32'
set.seed(2324)
fit_m2<- sem(m2, data=obsvar, se="bootstrap")
And while in R-Studio I get:
lavaan 0.6-3 ended normally after 24 iterations
Optimization method NLMINB
Number of free parameters 8
Used Total
Number of observations 7184 7377
Estimator ML
Model Fit Test Statistic 2.825
Degrees of freedom 1
P-value (Chi-square) 0.093
Markdown reports:
lavaan WARNING: the optimizer warns that a solution has NOT been found!lavaan WARNING: the optimizer warns that a solution has NOT been found!lavaan WARNING: only 998 bootstrap draws were successfullavaan 0.6-3 ended normally after 24 iterations
Optimization method NLMINB
Number of free parameters 8
Used Total
Number of observations 7184 7377
Estimator ML
Model Fit Test Statistic 2.825
Degrees of freedom 1
P-value (Chi-square) 0.093
Model test baseline model:
Minimum Function Test Statistic 354.749
Degrees of freedom 6
P-value 0.000
As you can see, both outputs are equal, but in Markdown it seems that there is no convergent solution. Can someone help me figure out what the issue is? What response can I trust? I noticed that deleting the bootstrapping from the code in markdown eliminates the Warning. However, for my model the bootstrapping is important because I want to contrast indirect and direct effects.
Thanks!