help me please..meditation model bootstrap

1,264 views
Skip to first unread message

helpme

unread,
Jan 12, 2023, 5:35:17 AM1/12/23
to lavaan
I am a beginner of R 

SEM mediation model analysis, the following warning message appears. Does anyone know how to solve it?
Why is this error occurring?


Warning message: In lav_model_nvcov_bootstrap(lavmodel = lavmodel, lavsamplestats = lavsamplestats, : lavaan WARNING: 3 bootstrap runs resulted in nonadmissible solutions.




교수님께 질문.png

Yves Rosseel

unread,
Jan 12, 2023, 10:18:29 AM1/12/23
to lav...@googlegroups.com
On 1/12/23 11:35, helpme wrote:
> SEM mediation model analysis, the following warning message appears.

It is not an error. It just an informative warning that some bootstrap
runs resulted in nonadmissible solutions (for example, with negative
variances).

Usually, this is nothing to worry about.

Yves.

helpme

unread,
Jan 12, 2023, 8:12:28 PM1/12/23
to lavaan

Thank you very much. However, I would like to know the results of the analysis of the indirect effect of bootstrapping. Do you know how to solve this message?
2023년 1월 13일 금요일 오전 12시 18분 29초 UTC+9에 yros...@gmail.com님이 작성:

Shu Fai Cheung (張樹輝)

unread,
Jan 12, 2023, 9:30:33 PM1/12/23
to lavaan
You can add ci = TRUE when calling summary(). E.g.,

summary(fit.med, ci = TRUE)

You should find the bootstrap CIs in the output.

Hope this helps.

-- Shu Fai
Message has been deleted

Brian O'Neill

unread,
May 4, 2023, 11:40:14 PM5/4/23
to lavaan
Hi. I have a similar "nonadmissible solutions" situation.

I ran a CFA with 3 factors (20 indicators total) and then the following SEM code for a small sample:

FIT01 <- sem(MYFMODEL, data = MYDATA, mimic = "Mplus", estimator = "ML", missing = "ML", se = "bootstrap", bootstrap = 10000, parallel = "snow", ncpus = cores)

I received the following notes:

2: In lav_model_nvcov_bootstrap(lavmodel = lavmodel, lavsamplestats = lavsamplestats,  :
  lavaan WARNING: 14 bootstrap runs failed or did not converge.
3: In lav_model_nvcov_bootstrap(lavmodel = lavmodel, lavsamplestats = lavsamplestats,  :
  lavaan WARNING: 9986 bootstrap runs resulted in nonadmissible solutions.
4: In lav_object_post_check(object) :
  lavaan WARNING: covariance matrix of latent variables
                is not positive definite;
                use lavInspect(fit, "cov.lv") to investigate.

However, I then ran parameterEstimates(), which returned information for all of the parameters. I did not find any negative error variances. Additionally, when I ran summary(), it returned the following in the results:

Parameter Estimates:

  Standard errors                            Bootstrap
  Number of requested bootstrap draws            10000
  Number of successful bootstrap draws            9986


Omega results appear strong:
compRelSEM(FIT01, obs.var = FALSE, tau.eq = FALSE, ord.scale = TRUE)
      f1          f2          f3          f12
      0.879       0.790       0.964       0.910


I'm not sure how to interpret all of this. Given the 9986 "successful bootstrap draws" and the returned parameter estimates, could I proceed with the analysis? Or is that all meaningless given the "9986 bootstrap runs resulted in nonadmissible solutions" warning? I would greatly appreciate any insight you may have.

Shu Fai Cheung

unread,
May 5, 2023, 10:17:23 AM5/5/23
to lav...@googlegroups.com
Regarding the 14 bootstrap runs that failed, given the extremely small proportion (.0014 or 0.14%), it can be safely ignored. Things like this can happen purely by chance in bootstrapping even if there is nothing wrong with the model and data.

For the warning about nonpositive definite covariance matrix of latent variables, you can run the following to see if any correlation is less than -1 or greater than 1:

lavInspect(fit, "cor.lv")

If yes, then you will need to check the model. This warning should appear for your model even if you do not ask for bootstrapping SEs/CIs.

My two cents.

Regards,
Shu Fai Cheung (張樹輝)


--
You received this message because you are subscribed to the Google Groups "lavaan" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lavaan+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lavaan/dc452770-fb48-40b2-b517-42592407e318n%40googlegroups.com.

Brian O'Neill

unread,
May 5, 2023, 10:04:18 PM5/5/23
to lavaan
Thank you very much!
Reply all
Reply to author
Forward
0 new messages