Bootstrap (CI, SE, ...) based on bootstrapLavaan

140 views
Skip to first unread message

car...@web.de

unread,
Jan 16, 2021, 5:26:16 PM1/16/21
to lav...@googlegroups.com

Is anyone interested in a library (not necessarily a new package) that builds on bootstrapLavaan and works with parameter estimates (unstandardized, standardized), with matrices (cov.xx, ...) and other coefficients (semTools:reliability, ...)? As a result, confidence intervals (BCa, ABC, Perc, ...) and so on are provided. I know that this forum is not a place for surveys of any kind. From there, I apologize for the question. For myself, I have roughly implemented the functionality described above and I wonder if others would be interested. Otherwise it wouldn't be worth the work to develop something "usable" out of it.

rras...@gmail.com

unread,
Jan 16, 2021, 8:28:49 PM1/16/21
to lavaan
I am interested. It would be a great tool to have.

Damiano Girardi

unread,
Jan 17, 2021, 12:34:18 AM1/17/21
to lav...@googlegroups.com
I think it would be extremely useful.

All the best

Damiano

Il giorno sab 16 gen 2021 alle ore 23:26 <car...@web.de> ha scritto:

Is anyone interested in a library (not necessarily a new package) that builds on bootstrapLavaan and works with parameter estimates (unstandardized, standardized), with matrices (cov.xx, ...) and other coefficients (semTools:reliability, ...)? As a result, confidence intervals (BCa, ABC, Perc, ...) and so on are provided. I know that this forum is not a place for surveys of any kind. From there, I apologize for the question. For myself, I have roughly implemented the functionality described above and I wonder if others would be interested. Otherwise it wouldn't be worth the work to develop something "usable" out of it.

--
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/9576a2dc-fbfe-5352-a84b-c1c770cf0e43%40web.de.


--
Damiano Girardi

Terrence Jorgensen

unread,
Jan 17, 2021, 11:02:21 PM1/17/21
to lavaan
Could be a good fit for semTools.  Are you thinking of just a wrapper with an argument to request one of the specific stats you mentioned?

Terrence D. Jorgensen
Assistant Professor, Methods and Statistics
Research Institute for Child Development and Education, the University of Amsterdam

car...@web.de

unread,
Jan 18, 2021, 5:18:47 AM1/18/21
to lav...@googlegroups.com
Thank you all for your positive feedback. @Terrence, I am thinking about implementing 3 features:


(1) Calculate confidence intervals from a fitted bootstrapLavaan object. Something like this:

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

fit <- sem(HS.model, data = HolzingerSwineford1939)
res <- bootstrapLavaan(fit, FUN = "coef", ...)
newBootFunction(object = res, conf = 0.95, type = "bca")

                ci.lower ci.upper
visual=~x2        0.3300   0.8825
visual=~x3        0.4946   1.1032
textual=~x5       0.9957   1.2626
...


This should also work with a custom FUN.


(2) There is obviously not very much information in the fitted bootstrapLavaan object. From there I would like to work supplementary with a wrapper to be able to provide some extra information. Like this:

newBootFunction(object = fit, ... (args for bootstrapLavaan), conf = 0.95, type = "bca")

                   coef    bias     se ci.lower ci.upper
visual=~x1       1.0000      NA     NA   1.0000   1.0000
visual=~x2       0.5535  0.0141 0.1426   0.3300   0.8825
visual=~x3       0.7294  0.0112 0.1534   0.4946   1.1032
...

A custom FUN should be usable here as well.


(3) Assuming different coefficients should be bootstrapped with a single bootstrap run (parameterEstimates, standardizedSolution, semTools::HTMT, ...), this would of course be possible with a custom FUN, but probably quite hard to implement for a less experienced user. That's why I would like to add something like this:

newBootFunction(object = fit, ... (args for bootstrapLavaan), out = c("parameterEstimates", "standardizedSolution", ...), conf = 0.95, type = "bca")

$parameterEstimates
                   coef    bias     se ci.lower ci.upper
visual=~x1       1.0000      NA     NA   1.0000   1.0000
visual=~x2       0.5535  0.0141 0.1426   0.3300   0.8825
visual=~x3       0.7294  0.0112 0.1534   0.4946   1.1032
...

$standardizedSolution
...

$`semTools::HTMT`
...



At least these are my current ideas. Perhaps a matrix representation of the results would also be useful, if one or more matrices are bootstrapped. It may well be that I am thinking in the wrong direction. Comments and criticism are very welcome.
--
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.

Terrence Jorgensen

unread,
Jan 19, 2021, 11:30:57 PM1/19/21
to lavaan
 (3) is exactly what I had in mind when I read your original suggestion.  From past posts, I think there would be some interest in preprogrammed routines for bootstrapping a set of particular results.  Depending on the choice of out= argument, the ... arguments could also be passed to bootstrapLRT(), which additionally involves the model-based ("Bollen-Stine") transformation.  There has been some recent research about bootstrapping fit indices that also depends on transforming the data.

Perhaps a matrix representation of the results would also be useful, if one or more matrices are bootstrapped

Perhaps, then, the out= function could take arguments to lavInspect().  Rather than "parameterEstimates" (which is a function that returns many values beyond what is needed), it could be either "coef" (a vector, like your current output example) or "est" (the estimates in LISREL matrices, and the output could be character strings of "lower ; upper" bounds).  And instead of merely "standardizedSolution", it could be any of "std.all", "std.lv", or "std.nox" (all of which lavInspect() returns in LISREL matrices).   

Shu Fai Cheung

unread,
Nov 9, 2021, 12:12:35 AM11/9/21
to lavaan
Found this old thread when searching for something related. The proposed tool will be very useful to my colleagues and students! Any progress on this library/package? I would be happy to introduce this tool to my students.

-- Shu Fai

Christian Arnold

unread,
Jan 24, 2022, 5:33:39 PM1/24/22
to lavaan
Hi Shu Fai, I will post an application shortly that may (or may not) solve some of your requirements. I would appreciate your feedback. Best. Christian
Reply all
Reply to author
Forward
0 new messages