Skip to content
Prev 4908 / 5636 Next

[R-meta] Difference between subset (in a loop) and mods in metafor rma.mv

Also, Brenden, if you want to replicate the results from when you subset
the data (i.e., not allowing the borrowing of info.) with a single model,
then you can do:

rma.mv(yi~Predictor+0, vi, random = list(~Predictor | Study, ~Predictor |
Article),
       struct = c("DIAG","DIAG"), data=dat)

which for your toy dataset, where predictor's categories have no
heterogeneity at the Article level, may be reduced to:

rma.mv(yi~Predictor+0, vi, random = ~Predictor | Study,
       struct = "DIAG", data=dat)

This topic has come up on the list a number of times, you may want to scan
through the listserv's archives for related examples (e.g.,
https://stat.ethz.ch/pipermail/r-sig-meta-analysis/2022-June/004074.html).

Reza


On Fri, Sep 29, 2023 at 11:25?AM Viechtbauer, Wolfgang (NP) via
R-sig-meta-analysis <r-sig-meta-analysis at r-project.org> wrote: