Skip to content
Prev 5370 / 5632 Next

[R-meta] Performance of metafor::vcalc() vs clubSandwich::impute_covariance_matrix()

Hi Tamar,

The difference in compute time is because of a difference in how the
default output of these functions is structured.
clubSandwich::impute_covariance_matrix() returns a block-diagonal by
default. metafor::vcalc() returns a full (dense) matrix by default. Say
that you have J studies and study j has kj effect sizes. The block-diagonal
matrix has sum(kj^2) entries, whereas the full matrix has sum(kj)^2
entries. If J is large and the kjs are mostly small, this can make for a
really big difference in object size. However, setting the option
vcalc(sparse = TRUE) will return a block-diagonal matrix and should lead to
performance comparable to impute_covariance_matrix().

Regarding your second question, I'm not sure what might be going on. Could
you provide a reproducible example?

James

On Tue, Aug 6, 2024 at 8:20?AM Tamar Novetsky via R-sig-meta-analysis <
r-sig-meta-analysis at r-project.org> wrote: