Skip to content
Prev 3683 / 5636 Next

[R-meta] Extracting pooled rma.mv model summary statistics after multiple imputation

Hi Wolfgang,

Thanks again for your helpful response.

If I may, I have another question ? how can I calculate the pooled variance inflation factors for each moderator to test for collinearity (again, after using mice for multiple imputation)?

Many thanks,
Tom


From: Viechtbauer, Wolfgang (SP) <wolfgang.viechtbauer at maastrichtuniversity.nl>
Sent: Sunday, 14 November 2021 1:58 AM
To: Thomas Swanton <thomas.swanton at sydney.edu.au>; r-sig-meta-analysis at r-project.org <r-sig-meta-analysis at r-project.org>
Subject: RE: Extracting pooled rma.mv model summary statistics after multiple imputation 
?
Hi Thomas,

Thanks for the example. This leads to an error though in this step:
Error in h(simpleError(msg, call)) :???????????????????????????????????????????????????????????????????????????????????? 
? error in evaluating the argument 'object' in selecting a method for function 'summary': the condition has length > 1

To be precise, by default, you will just get a bunch of warnings, but I use:

Sys.setenv("_R_CHECK_LENGTH_1_CONDITION_"="true")

which ends up switching the warnings here to errors.

The problem really comes from:
Error in if (x$ddf > 0) qt(level/2, df = x$ddf, lower.tail = FALSE) else NA :??????????????????????????????????????????? 
? the condition has length > 1 

And this error comes from a bug in 'broom' which is used by 'mice'. The problem is in tidy.rma(), namely this line:

https://protect-au.mimecast.com/s/GOuDCjZ1N7inN41D0uW2cOp?domain=github.com

crit <- if (x$ddf > 0) qt(level/2, df=x$ddf, lower.tail=FALSE) else NA

In rma.mv() models with test="t", x$ddf is a vector, not a single value, and hence we get an if() conditions that has length > 1. I will report this to the broom authors.

As for your actual question, see this:

https://protect-au.mimecast.com/s/Py6MCk81N9tOGy3AvsVz45E?domain=stat.ethz.ch

So you could do:

round(apply(sapply(fit$analyses, \(x) x$sigma2), 1, mean), 4)
format.pval(median(sapply(fit$analyses, \(x) x$QEp)))
format.pval(median(sapply(fit$analyses, \(x) x$QMp)))

Best,
Wolfgang