You are here

How to exclude warnings from simulation study?

5 posts / 0 new
Last post
Veronica_echo's picture
Offline
Joined: 02/23/2018 - 01:57
How to exclude warnings from simulation study?

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!

jpritikin's picture
Offline
Joined: 05/24/2012 - 00:35
mxBootstrap?

If you're using mxBootstrap then you can decide how to classify status codes with the OK argument. See the man page.

AdminRobK's picture
Offline
Joined: 01/24/2014 - 12:15
bootstrapping

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?

Veronica_echo's picture
Offline
Joined: 02/23/2018 - 01:57
Thanks for your kind response

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?

AdminRobK's picture
Offline
Joined: 01/24/2014 - 12:15
Yes, I get it now. It may

Yes, I get it now. It may interest you that a built-in jackknifing feature is planned as a future feature of OpenMx.