Questions about the "successfully bootstrap draws" in lavaan

225 views
Skip to first unread message

施沁懷

unread,
May 5, 2023, 2:58:59 PM5/5/23
to lavaan
Hello, when using bootstrapping to decide SE of estimations, lavaan gives warnings about the numbers of "successfully bootstrap draws."

I have two questions:
1. How does the package define "failed" cases? Only when "a solution has NOT been found," or it also includes cases when "some estimated variances are negative?"

2. What is the minimum acceptable rate of successful cases? like 80%. 90%, or 99%? I really can't find an article talking about this.

In fact, I am trying to customize a function that allows me to resample clusters, instead of observations, with replacements and re-run the model specification with lavaan.
This is because I use cluster argument to get robust SE in the non-bootstrap lavaan model and need to perform bootstrapping in order to test for mediation.

I tried to define the failed cases as signs of Heywood cases such as the appearance of negative variances or std.all higher than 1. 
Without filtering these cases, the distribution of the bootstrap results turns out to be very extreme.
I computed the successful rate according to these criteria.
The rate is steadily around 90%.

Thanks for your time and patience.

Christian Arnold

unread,
May 5, 2023, 3:54:47 PM5/5/23
to lav...@googlegroups.com
Hi,

Look at lavInspect "converged" and "post.check". That should probably answer some questions. x.boot (see forum) provides more detailed information about this issue and some aid. I know that x.boot currently produces errors because "return.boot" was removed from bootstrapLavaan. I'll try to post a solution as soon as possible.

HTH

Christian


Von: lav...@googlegroups.com <lav...@googlegroups.com> im Auftrag von 施沁懷 <r093...@g.ntu.edu.tw>
Gesendet: Freitag, 5. Mai 2023, 20:59
An: lavaan <lav...@googlegroups.com>
Betreff: Questions about the  "successfully bootstrap draws" in lavaan
--
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/30cec6e8-5e4f-4c66-a28c-40f4f6098518n%40googlegroups.com.

Christian Arnold

unread,
May 6, 2023, 6:00:33 AM5/6/23
to lav...@googlegroups.com
Hi,

these are some aspects for which I had originally developed x.boot. Here is an example:


library(lavaan)
source("x.boot.r")            

HS.model <- "
visual  =~ x1 + x2 + x3
textual =~ x4 + x5 + x6
speed   =~ x7 + x8 + x9

x3 ~~ x5
x4 ~~ x7
x7 ~~ x8
"                    

# Create x.boot.object
set.seed(1)
fit <- sem(HS.model, HolzingerSwineford1939)
HS.boot <- x.boot(fit, R = 400, verbose = TRUE, group = "school")
summary(HS.boot)


The summary function provides the following overview:



Bootstraps:  400
Converged:   399
Admissible:  237
Object size: 60.1 Mb
Storage:     RAM


If you want to know which bootstrap draws did not pass the post.check, then you can pass warnings = TRUE:



summary(HS.boot, warnings = TRUE)


This provides:



Bootstraps:  400
Converged:   399
Admissible:  237
Object size: 60.1 Mb
Storage:     RAM

Bootstrap number: 1
Bootstrap number: 4
Bootstrap number: 7
Bootstrap number: 13
Bootstrap number: 20
[...]
Bootstrap number: 390


If you now want to analyze boostrap draw 390 (or another draw) in more detail, this is how to do it:



summary(HS.boot$bootstrap[[390]])


Non-converged draws are not considered. I have posted a new version on the forum that avoids the "return.boot" problem and should now work again.

HTH

Christian

Von: Vic Shih <r093...@g.ntu.edu.tw>
Gesendet: Samstag, 6. Mai 2023 10:51
An: Christian Arnold <Christia...@hhl.de>
Betreff: 與 Questions about the "successfully bootstrap draws" in lavaan 有關的私人訊息
 
Thank you for your informative reply, which provides me with an easier way to detect "failed" cases with the lavInspect function.

I have checked your post about x.boot which can replace (autofill) non-converge cases with converge cases. 
Still, I am wondering whether the function records how many cases are non-converge relative to the converge cases in the process or even lets us check in what resampled cases the model didn't converge.
I know this is more like a theoretical but not technical question.
But I am curious if the model always failed when a specific group of observations is drawn, will this be a limitation or concern for the inference of bootstrap result?
I know that when the failed case only takes a minimal proportion of the total draws, it may not be a serious concern. 
The reply of Terrence Jorgensen in another post:

I am not sure if this is still the case when one-tenth, one-fifth, or more of the draws are non-converged, although I can replace them with the converged ones to get the objective numbers of the successful draws I want.

Thanks.

christia...@hhl.de 在 2023年5月6日 星期六凌晨3:54:47 [UTC+8] 的信中寫道:
Reply all
Reply to author
Forward
0 new messages