Skip to content

[R-meta] Exclude answer category from moderation test

4 messages · Wiertsema, M., Wolfgang Viechtbauer, Michael Dewey

#
Hi everyone,

Perhaps a silly question, but I cannot seem to find the answer I need.
So here's my question: I have a certain variable with three answer
categories (x, y, and z). Now, I want to perform a moderation test
based on this variable but I only want to compare Y and Z in this
moderation test. Is there a way to exclude answer option 'x' in the
moderator analysis via code?
I know I can also adjust my data set and create a new variable with
only the options 'y' and 'z', but I was wondering if it could be
easier with the metafor package.

I hope anyone knows this!
Many thanks in advance!

Best,
Maria Wiertsema
#
Dear Maria,

If you want to exclude the studies where the moderator is equal to 'x' from the analysis, then you could use the 'subset' argument (e.g., subset=moderator!="x").

Best,
Wolfgang
#
Great, thank you so much!

Op vr 24 jun. 2022 om 15:28 schreef Viechtbauer, Wolfgang (NP)
<wolfgang.viechtbauer at maastrichtuniversity.nl>:

  
    
#
Dear Maria

Do you want to test on a restricted subset of the data (as Wolfgang has 
shown you) or do you want to test if the coefficient of Y is equal to 
that of Z? In the latter case I think you are looking to use anova.rma() 
after your initial fit.

Michael
On 24/06/2022 14:28, Viechtbauer, Wolfgang (NP) wrote: