[R-meta] Separate tau for each subgroup in mixed-effect models

Viechtbauer, Wolfgang (NP) wo||g@ng@v|echtb@uer @end|ng |rom m@@@tr|chtun|ver@|ty@n|
Tue Sep 6 21:45:50 CEST 2022

Hi Arthur,

If you fit a random-effects model per subgroup (or use a single model that accomplishes the exact same thing), it's an unconditional inference as far as I am concerned.


>-----Original Message-----
>From: Arthur Albuquerque [mailto:arthurcsirio using gmail.com]
>Sent: Friday, 02 September, 2022 3:57
>To: R meta; Viechtbauer, Wolfgang (NP)
>Cc: James Pustejovsky
>Subject: RE: [R-meta] Separate tau for each subgroup in mixed-effect models
>I now realized this discussion is related to the discussion presented in this
>book: https://bookdown.org/MathiasHarrer/Doing_Meta_Analysis_in_R/subgroup.html
>To my understanding, they argue - while citing Borenstein & Higgins 2013 - that
>the models you discussed treat subgroups as “fixed-effects”, but also assume
>studies within subgroups follow the random-effects model (see their Figure 7.1).
>Thus, I conclude these model impose a conditional inference to the subgroups
>What do you think?
>Arthur M. Albuquerque
>Borenstein, Michael, and Julian P. T. Higgins. ‘Meta-Analysis and Subgroups’.
>Prevention Science 14, no. 2 (April 2013): 134–
>43. https://doi.org/10.1007/s11121-013-0377-7
>On Sep 1, 2022, 5:18 AM -0300, Viechtbauer, Wolfgang (NP)
><wolfgang.viechtbauer using maastrichtuniversity.nl>, wrote:
>This has also been possible with the rma.mv() function:
>So, actually, there are three different ways one can do this:
>1) Fit separate RE models within subgroups.
>dat <- escalc(measure="RR", ai=tpos, bi=tneg, ci=cpos, di=cneg, data=dat.bcg)
>res1 <- list(rma(yi, vi, data=dat, subset=alloc=="alternate"),
>rma(yi, vi, data=dat, subset=alloc=="random"),
>rma(yi, vi, data=dat, subset=alloc=="systematic"))
>dat.comp <- data.frame(meta = c("alternate","random","systematic"),
>estimate = sapply(res1, coef),
>stderror = sqrt(sapply(res1, vcov)),
>tau2 = sapply(res1, \(x) x$tau2))
>dat.comp <- dfround(dat.comp, 4)
>2) Fit an rma.mv() model with a random effects structure that allows tau^2 to
>differ across groups.
>res2 <- rma.mv(yi, vi, mods = ~ 0 + alloc, random = ~ alloc | trial,
>struct="DIAG", data=dat)
>3) Use a location-scale model with a categorical scale variable.
>res3 <- rma(yi, vi, mods = ~ 0 + alloc, scale = ~ 0 + alloc, data=dat)
>predict(res3, newscale=diag(3), transf=exp)
>Instead of using the (default) log link, we can also use an identity link to fit
>this model:
>res4 <- rma(yi, vi, mods = ~ 0 + alloc, scale = ~ 0 + alloc, data=dat,
>Compare the log likelihoods:
>sum(sapply(res1, logLik)) # add up the three log likelihoods
>The results match up nicely, as they should.[1] This is in fact a nice
>confirmation that the underlying code - which is rather different for these
>different approaches - works as intended.
>[1] You might actually see minor discrepancies here and there. They can arise due
>to differences in how these models are fitted and the optimization routines used.

More information about the R-sig-meta-analysis mailing list