[R-meta] Multiple Categorical moderators - Syntax
Viechtbauer, Wolfgang (SP)
wolfgang.viechtbauer at maastrichtuniversity.nl
Fri Apr 27 18:56:46 CEST 2018
What instruction manual are you using? There is no 'byvar' argument or function in metafor.
I assume you mean that *Dogs*, *Cats*, etc. are the _levels_ of some categorical moderator. Let's call it 'species'. Then just add this variable as a moderator to the model:
res <- rma(yi, vi, mods = ~ species, data=dat)
These may also be useful:
From: R-sig-meta-analysis [mailto:r-sig-meta-analysis-bounces at r-project.org] On Behalf Of angelo solarino
Sent: Friday, 27 April, 2018 17:17
To: r-sig-meta-analysis at r-project.org
Subject: [R-meta] Multiple Categorical moderators - Syntax
I am new to this mailing list and i am writing because i am having some
problem transiting from a commercial software to metafor, and i would like
to enquire your help.
I want to compare the effect size across multiple categorical moderators,
for instance: *Dogs*, *Cats*, *Parrots *and *Dolphins*. In the instruction
manual it is said that I need to create multiple dummy variables (one per
category) and then select them in the rma function with the command byvar.
At this point, apparently I am not able to continue because I am doing
something wrong and I haven't figured out what.
Could you please share an example of the syntax for a meta-analysis with
multiple categorical moderators?
Thank you for your time and consideration. I look forward to hearing from
More information about the R-sig-meta-analysis