[R-meta] Metafor: meta regression using rma function for proportion with categorical and continuous variable using PFT transformation
Viechtbauer, Wolfgang (NP)
wo||g@ng@v|echtb@uer @end|ng |rom m@@@tr|chtun|ver@|ty@n|
Tue Oct 1 09:12:55 CEST 2024
You need to give the 'at' argument to emmprep(), which is a wrapper around emmeans::qdrg(), which in turn is a wrapper around emmeans::ref_grid(). Here is an example using identical models fitted with rma() and lm() to show that this yields identical results:
library(metafor)
library(emmeans)
dat <- dat.debruin2009
dat <- escalc(measure="PLO", xi=xi, ni=ni, data=dat)
res1 <- rma(yi, vi=0, mods = ~ scq + ethnicity, data=dat, test="knha")
grd <- emmprep(res1, at=list(scq=12))
emmeans(grd, pairwise ~ scq + ethnicity, type="response", infer=c(TRUE,TRUE))
res2 <- lm(yi~ scq + ethnicity, data=dat)
emmeans(res2, pairwise ~ scq + ethnicity, tran="logit", type="response", infer=c(TRUE,TRUE), at=list(scq=12))
Best,
Wolfgang
> -----Original Message-----
> From: Reza Norouzian <rnorouzian using gmail.com>
> Sent: Tuesday, October 1, 2024 03:07
> To: R Special Interest Group for Meta-Analysis <r-sig-meta-analysis using r-
> project.org>
> Cc: Viechtbauer, Wolfgang (NP) <wolfgang.viechtbauer using maastrichtuniversity.nl>
> Subject: Re: [R-meta] Metafor: meta regression using rma function for proportion
> with categorical and continuous variable using PFT transformation
>
> Wolfgang,
>
> I typically use emmeans for post model comparisons of this kind. But in applying
> this to your example, I noticed the "at=" argument in emmeans(), to hold say
> _scq_ at 12, is not coming through from emmprep() --at least for me-- at all. If
> this is true for you all as well, then it could possibly be some bug lurking
> around somewhere in emmprep() or qdrg().
>
> Reza
>
> dat <- dat.debruin2009
> dat <- escalc(measure="PLO", xi=xi, ni=ni, data=dat)
>
> res <- rma(yi, vi, mods = ~ scq + ethnicity, data=dat)
> grd <- emmprep(res)
>
> emmeans(grd, pairwise~scq + ethnicity, type="response", infer=c(TRUE,TRUE),
> at=list(scq=12))
>
> Compare to:
>
> res2 <- lm(yi~ scq + ethnicity, data=dat)
>
> emmeans(res2, pairwise~scq + ethnicity, tran= "logit",
> type="response", infer=c(TRUE,TRUE),
> at = list(scq = 12))
>
> On Mon, Sep 30, 2024 at 2:11 AM Viechtbauer, Wolfgang (NP) via R-sig-meta-
> analysis <mailto:r-sig-meta-analysis using r-project.org> wrote:
> Dear Daidai,
>
> Using the FT transformation for a meta-analysis is actually quite problematic:
>
> Schwarzer, G., Chemaitelly, H., Abu-Raddad, L. J., & Rücker, G. (2019).
> Seriously misleading results using inverse of Freeman-Tukey double arcsine
> transformation in meta-analysis of single proportions. Research Synthesis
> Methods, 10(3), 476–483. https://doi.org/10.1002/jrsm.1348
>
> Röver, C., & Friede, T. (2022). Double arcsine transform not appropriate for
> meta‐analysis. Research Synthesis Methods, 13(5), 645–648.
> https://doi.org/10.1002/jrsm.1591
>
> So I would generally advise against its use. Good alternatives are the standard
> arcsine or logit transformations.
>
> The appropriate back-transformations are transf.iarcsin() and transf.ilogit()
> (the latter is really just plogis()). But you cannot back-transform the
> coefficients with these transformations, since these are non-linear
> transformations (so the influence of one moderator depends on the values of the
> other moderators). You can however back-transform predicted values based on the
> model. Consider this example:
>
> library(metafor)
>
> dat <- dat.debruin2009
> dat <- escalc(measure="PLO", xi=xi, ni=ni, data=dat)
>
> res <- rma(yi, vi, mods = ~ scq + ethnicity, data=dat)
> res
>
> # compute predicted values for scq=11 and scq=12 for ethnicity=caucasian
> out <- predict(res, newmods=cbind(c(11,12),0), transf=transf.ilogit)
> out
> out$pred[2] - out$pred[1]
>
> # compute predicted values for scq=11 and scq=12 for ethnicity=other
> out <- predict(res, newmods=cbind(c(11,12),1), transf=transf.ilogit)
> out
> out$pred[2] - out$pred[1]
>
> Notice that the difference between predicted values that differ by one unit on
> scq depends on ethnicity.
>
> For logit-transformed proportions, you can however exponentiate the
> coefficients, which then correspond to odds ratios:
>
> round(exp(coef(summary(res)))[c(1,5,6)], digits=2)
>
> So, a one-unit increase in scq corresponds to a 1.05 times increase in the odds
> (or the odds are 5% higher when scq is one unit higher) and this holds true
> whether ethnicity=caucasian or ethnicity=other.
>
> Best,
> Wolfgang
More information about the R-sig-meta-analysis
mailing list