Hi Mike, Hope you're well. I was just wondering whether there's a simple way to bootstrap the indirect effect in metasem (tssem2 or osmasem).
Thanks,
Best wishes,
Pasco
Hi Mike, I think I figured it out, but would appreciate a thumbs up if you have time:
ind <- mxAlgebra(a*b, name="ind")
fit1 <- osmasem(model.name="test", Mmatrix=M1, Tmatrix=T0, data=dat, intervals.type=c("LB"), mxModel.Args = list(ind, mxCI(c("ind"))), suppressWarnings=FALSE) summary(fit1)
boot1<-mxBootstrap(fit1$mx.fit) summary(boot1, summary(boot1, boot.quantile=c(.025,.975))) mxBootstrapEval(ind, boot1, bq=c(.025,.975))
Hi Pasco,
Your code seems correct.
There are at least two issues in the bootstrap CI in MASEM: (1) the number of studies tends to be small; (2) there may be many missing correlations in the studies. But I would prefer the LBCI unless there is evidence to show the other way.
Best, Mike
Thanks Mike! We have a reviewer 3 with strong views about this.... but your take is extremely helpful!
Hi Mike,
I think I figured it out, but would appreciate a thumbs up if you have time:
ind <- mxAlgebra(a*b, name="ind")
fit1 <- osmasem(model.name="test", Mmatrix=M1, Tmatrix=T0, data=dat, intervals.type=c("LB"), mxModel.Args = list(ind, mxCI(c("ind"))), suppressWarnings=FALSE)
summary(fit1)
boot1<-mxBootstrap(fit1$mx.fit)
summary(boot1, summary(boot1, boot.quantile=c(.025,.975)))
mxBootstrapEval(ind, boot1, bq=c(.025,.975))
Hi Pasco,
Your code seems correct.
There are at least two issues in the bootstrap CI in MASEM: (1) the number of studies tends to be small; (2) there may be many missing correlations in the studies. But I would prefer the LBCI unless there is evidence to show the other way.
Best,
Mike
Thanks Mike! We have a reviewer 3 with strong views about this.... but your take is extremely helpful!