How to exclude warnings from simulation study?

Posted on
No user picture. Veronica_echo Joined: 02/23/2018
Hi everyone,

I am conducting a simulation study for my model and one aim of the simulation study is to obtain the coverage probability of bootstrap CI (here I am using 1000 bias-corrected and accelerated bootstrap). I think I should use repeat loop with "try()" function and "try-error" statement to exclude replications reporting errors (mainly error code 5), but how could I exclude warnings (error code 5, 6, and sometimes 10)? Additionally, if the main model runs well (without any errors or warnings), does it guarantee all its jackknife models and bootstrap models work well? I appreciate any advice!

Replied on Tue, 05/01/2018 - 09:01
Picture of user. jpritikin Joined: 05/23/2012

If you're using mxBootstrap then you can decide how to classify status codes with the OK argument. See the man page.
Replied on Tue, 05/01/2018 - 12:56
Picture of user. AdminRobK Joined: 01/24/2014

It sounds as though you're using your own bootstrap loop written in R, and not using mxBootstrap(), correct? If your script makes repeated direct calls to mxRun(), then pass argument suppressWarnings=TRUE to mxRun().

Additionally, if the main model runs well (without any errors or warnings), does it guarantee all its jackknife models and bootstrap models work well?

A "guarantee" is too much to ask; taking this question at face value, the answer would have to be "no." In the case of jackknifing, though, I'd expect that if the main model runs well, then much of the time (maybe even most of the time) the jackknife models will run well, too.

I am using 1000 bias-corrected and accelerated bootstrap

I'm curious--how are you calculating the acceleration coefficients?
Edit: duh, you mentioned jackknifing, so I guess you're using the jackknife results to calculate the acceleration coefficients?

Replied on Tue, 05/01/2018 - 13:36
No user picture. Veronica_echo Joined: 02/23/2018

In reply to by AdminRobK

Thanks for your kind response and advice. Yes, I am using jackknife results to calculate the acceleration coefficients. And for bootstrap part, I do use mxBootstrap() to get, say 1000 point estimates and then calculate BCa. Does it make sense?