Dear group members
I conducted a mediation model using lavaan. I got no error and no warning without bootstrapping. However, when using bootstrapping (n = 10000), I got a warning below:
"## Warning in lav_model_estimate(lavmodel = lavmodel, lavpartable = lavpartable, : lavaan WARNING: the optimizer (NLMINB) claimed the model converged,
## but not all elements of the gradient are (near) zero;
## the optimizer may not have found a local solution
## use check.gradient = FALSE to skip this check."
This warning repeated several times and at the end I have the other warning:
## Warning in bootstrap.internal(object = NULL, lavmodel. = lavmodel,
## lavsamplestats. = lavsamplestats, : lavaan WARNING: only 9960 bootstrap draws
## were successful.
I did get the estimated results and the model summary showed that I requested 10000 bootstrap draws but 9960 draws were successful. I have no latent variables in the model, and I tried scaling all variables included in the model, but still got the same warnings.
I assume that a bootstrap draw would not be successful when the gradient elements are not zero. Please correct me if I'm wrong!
My question is whether this warning is an issue when using bootstrapping? Are the estimations still reliable in this situation? Is there any way to solve the warning?
Thank you very much!
Liu