[R] Metafor: Differences between two categories of a moderator

Viechtbauer Wolfgang (STAT) wolfgang.viechtbauer at maastrichtuniversity.nl
Tue May 31 17:20:02 CEST 2011


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
________________________________________
From: r-help-bounces at r-project.org [r-help-bounces at r-project.org] On Behalf Of Holger Steinmetz [Holger.steinmetz at web.de]
Sent: Tuesday, May 31, 2011 12:52 PM
To: r-help at r-project.org
Subject: [R] Metafor: Differences between two categories of a moderator

Hi there,

when using the metafor package for testing mixed effects models with
categorical moderators, I get a regression table reporting betas. These
betas are mean differences between a certain category in the effect size to
the reference category (intercept). In addition, the QM-tests allows testing
if the differences between all the categories TO the reference are
significant or not.

The problem is that if there are differences AMONG the categories (but not
to the reference), the QM-test will not notice that. Hence, my question is
if there is an option to test differences among specific categories (e.g.,
simple subgroup comparison).

Best,
Holger


--
View this message in context: http://r.789695.n4.nabble.com/Metafor-Differences-between-two-categories-of-a-moderator-tp3562778p3562778.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


More information about the R-help mailing list