Ah, that is a good motivation indeed! :-)
OK, here's the (undocumented) hack: You can access that (or any) vcov via the standardizedSolution(type=) argument, ONLY when you also set a hidden argument return.vcov = TRUE. The trick is to leave out the initial "vcov." from any lavInspect(what=) option, because I already paste() that in front of any type= string.
standardizedSolution.mi(fit, return.vcov = TRUE,
type = "def.std.all") # or "def.joint.std.all"
I implemented this hack for the semTools::monteCarloCI() function to work on lavaan.mi-class objects when standardized=TRUE. Ultimately, it will return ANY lavInspect(what="vcov.*") output, which I had not foreseen being useful for anything else. So I do not "support" this as a public feature, but it is a hack that will accomplish this particular goal.
Here is a
reprex, in case anyone else finds this useful:
library(lavaan.mi)
data(HS20imps) # import a list of 20 imputed data sets
## specify CFA model from lavaan's ?cfa help page
HS.model <- '
visual =~ x1 + a*x2 + x3
textual =~ x4 + b*x5 + x6
speed =~ x7 + c*x8 + x9
'
## fit model to 20 imputed data sets
fit <- cfa.mi(HS.model, data = HS20imps, constraints = 'abc := a*b*c')
standardizedSolution.mi(fit, return.vcov = TRUE, type = "def.std.all")
standardizedSolution.mi(fit, return.vcov = TRUE, type = "def.joint.std.all")
I would appreciate if you respond with your own reprex, to demonstrate how this can be useful for the
restriktor or
gorica packages.