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

From: Viechtbauer Wolfgang (STAT) <wolfgang.viechtbauer_at_maastrichtuniversity.nl>
Date: Tue, 31 May 2011 17:20:02 +0200

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.

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. Received on Tue 31 May 2011 - 15:23:17 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 01 Jun 2011 - 08:20:11 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive