I am doing meta analysis using "rma" (function) in the "metafor" package (in R). And this is my first time to do meta analysis.

The estimate is a proportion (# of patients with good outcome / Total # of patients).
Each paper has two groups to compare (Treatment 1 vs Treatment 2).
However, I do also know the average age, # of females, and location (country) of each paper.
I suspect that these three covariates affect the "proportion";
therefore I would like to adjust the effect from them.

In rma function, there is an argument called "mods", where I can put "moderator" variables. In such case, to adjust covariates, can I use (something like)

rma.da.adjusted <- rma(yi, vi, data = meta.dat, method = "DL",
                       mods = ~ age + female + location + treatment_group )

Here, age and female are continuous covariates, and location and treatment_group are categorical covariates.

Thank you in advance!!

  • $\begingroup$ As long as they are appropriately coded (just like regression), yes. $\endgroup$ Jun 30, 2020 at 16:05
  • $\begingroup$ Hi @JeremyMiles Thanks for the comment! So... if I use "mods = ~ treatment_group", then it means I am not considering any other covariates to adjust. However if I use "mods = ~ age + female + location + treatment_group", then am I considering demographic and geographic covariates to adjust? I hope I understand correctly. $\endgroup$
    – KLee
    Jun 30, 2020 at 22:55
  • $\begingroup$ Yes. Note that these are at the study level though, not the individual person level. $\endgroup$ Jun 30, 2020 at 23:38
  • $\begingroup$ @JeremyMiles I appreciate it!!! $\endgroup$
    – KLee
    Jul 1, 2020 at 1:34

1 Answer 1


It would be more usual to compute some measure of the treatment effect and then use the other three moderator variables. You have the choice between odds ratios, risk ratios, risk differences, and so on.

Note that for average age and percent female you are doing an ecological analysis. You are not looking at whether being a woman affects your outcome but on whether being enrolled in a study which has a high proportion of women affects your outcome an similarly for average age. Country is fine as that is identical for every patient in each trial.

  • $\begingroup$ Hi @mdewey , Thanks for your comment. I have a question. What do you mean by the first sentence? I have proportions to compare (proportion in Treatment A, proportion in Treatment B) in each paper. I can calculate the effect size or measure of each proportion based on escalc function. Do you mean this effect size? $\endgroup$
    – KLee
    Jun 30, 2020 at 22:50
  • $\begingroup$ If you do that, an arm-based approach, then I suspect you need to include interactions between treatment and the moderators as well. It would be more direct and common to compute OR, RR, RD or one of the other comparative measures. $\endgroup$
    – mdewey
    Jul 1, 2020 at 8:41
  • $\begingroup$ Thanks! Because I only have proportions, I cannot compute OR, RR or RD. However I can use "The double-arcsine transformation". And... so the moderator is Treatment group (A and B) (right?). And what is the interactions between treatment? Are they age, gender, location, etc? $\endgroup$
    – KLee
    Jul 1, 2020 at 16:42
  • $\begingroup$ In your question you state you have the numbers with a good outcome and the total numbers so I do not see why you cannot compute any of the measures. $\endgroup$
    – mdewey
    Jul 1, 2020 at 17:11
  • $\begingroup$ The purpose of this research is to run the meta analysis with proportions. That is the main reason :-) $\endgroup$
    – KLee
    Jul 1, 2020 at 18:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.