Skip to content

[R-meta] Metafor: meta regression using rma function for proportion with categorical and continuous variable using PFT transformation

1 message · Wolfgang Viechtbauer

#
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