Skip to content
Prev 261446 / 398502 Next

Metafor: Differences between two categories of a moderator

Dear Holger,

Actually, the omnibus test ("QM-test") will give you the same result regardless of which category you make the reference category (try it out!). So, it will pick up all of the differences, whether they are to the reference category or between any of the other categories.

If the omnibus test turns out significant, then you can examine the pairwise differences. Essentially, that is what the individual betas are. You will have to switch the reference category to get all of the pairwise comparisons (the relevel function comes in handy here).

Here is an example to illustrate all of this:

data(dat.bcg)
dat <- escalc(measure="RR", ai=tpos, bi=tneg, ci=cpos, di=cneg, data=dat.bcg, append=TRUE)

res <- rma(yi, vi, mods=~factor(alloc), data=dat)
res

res <- rma(yi, vi, mods=~relevel(factor(alloc),"random"), data=dat)
res

Best,

--
Wolfgang Viechtbauer
Department of Psychiatry and Neuropsychology
School for Mental Health and Neuroscience
Maastricht University, P.O. Box 616
6200 MD Maastricht, The Netherlands
Tel: +31 (43) 368-5248
Fax: +31 (43) 368-8689
Web: http://www.wvbauer.com