[R-meta] Effect coding in metafor
yogev_k at yahoo.com
Wed Feb 28 18:07:34 CET 2018
Thanks for the link, this is very helpful in general!
However, I am still a bit confused about how to obtainestimates of a main effect. In model ‘res.a1’ in the example in the link, wouldyou interpret the estimate of the ‘testeraware’ coefficient (b3 = -.0511) as atest of the main effect of the ‘tester’ factor? Given that the ‘weeks’ factoris dummy coded, I thought that ‘testeraware’ represents the simpleeffect of ‘tester’ within the ‘none’ level. If the latter is correct, than I amlooking for a way to test for a main effect (in this example, the effect of ‘tester’across the levels of ‘weeks’).
Yogev Kivity, Ph.D.
Department of Psychology
The Pennsylvania State University
Bruce V. Moore Building
University Park, PA 16802
Office Phone: (814) 867-2330
On Monday, February 26, 2018, 9:08:23 AM EST, Viechtbauer Wolfgang (SP) <wolfgang.viechtbauer at maastrichtuniversity.nl> wrote:
Here is an extensive discussion of an example with 2 categorical moderators and it happens to be the case that it also involves one dichotomous and one 3 level factor:
I don't see why you need to change the coding.
>From: R-sig-meta-analysis [mailto:r-sig-meta-analysis-bounces at r-
>project.org] On Behalf Of Yogev Kivity
>Sent: Monday, 26 February, 2018 4:38
>To: r-sig-meta-analysis at r-project.org
>Subject: [R-meta] Effect coding in metafor
>I am running a meta-analysis with 2 categorical moderators, one is
>dichotomous and the other has 3 levels (e.g. x1 and x2). For example:
>rma.mv(yi, V, mods=~factor(x1)*factor(x2), random = ~ 1 |
>(the specifics of the design of the meta-analysis seemed irrelevant to
>me, but if I am mistaken, I am happy to provide further details)
>As a first step, I am interested in the main effects of both moderators
>as well as the interaction effect. Therefore, to my understanding, I need
>both moderators to be set as effect coding factors, rather then dummy
>coding factors. However, I could not figure out a way to do it in
>metafor. For example, setting the following contrasts did not work, and
>essentially the output remained identical to that of the dummy variables
>(i.e., each estimate expresses the simple effect of the moderator within
>the reference category of the other moderator):
>Obviously, I can get around the problem by creating multiple numeric
>variables with weights that correspond to the desired effect coding, but
>I was wondering whether I am missing something and whether there is a
>more elegant way of doing it.
>Yogev Kivity, Ph.D.
>Department of Psychology
>The Pennsylvania State University
>Bruce V. Moore Building
>University Park, PA 16802
>Office Phone: (814) 867-2330
[[alternative HTML version deleted]]
More information about the R-sig-meta-analysis