# Using moderator in metafor Binomial-Normal model that varies within study

I had some data where I had previously examined the proportion with recurrent hepatocellular carcinoma (HCC) using the BN model as such

res<-rma.glmm(measure="PLO",xi=ai1,ni=ni1,data=metadata)
res1p<-predict(res,transf=transf.ilogit,digits=2)


The investigator is now interested in, for example, the effect of gender on HCC recurrence. I have the number of males in each study.

Can this be analyzed?

I ask because in every example I've seen, the mods variable(s) is/are something that only varies between studies (i.e. study year, study location, whatever), not within studies.

Is it possible I could make a study-specific variable to reflect gender, something like proportion male? Or is this not something that can be done?

I'm new to meta-analysis so any help is appreciated.

res2<-rma.glmm(measure="PLO",xi=ai1,ni=ni1,mods=????,data=metadata)


People do do what you suggest and include as a moderator something like proportion of women, average age, and so on. The drawback with doing this is that what the moderator tells you is the effect of being enrolled in a study with a high proportion of women, or a high average age, not the effect of being a woman or an older person. If you are happy with that interpretation for your scientific question then go ahead but many people find it less appealing.

• Ideally, one would want the proportion with HCC for males and females separately and then include a dummy variable to indicate whether the proportion corresponds to a sample of males or females. In the absence of this information, including the proportion of males as a predictor is a possibility, with exactly the caveat mentioned by @mdewey (this is indeed often done, but the limitation of this approach is also often not properly acknowledged). – Wolfgang Mar 26 '17 at 13:35
• Thank you, and thanks for the metafor package Wolfgang. Is there a way to adjust for differing tau-squared in rma.glmm? I saw there is no random statement, i.e. I cannot do random=~trt | Study. We may not actually do the regression I mentioned because we don't have enough studies but I'm just curious. – Scott Jackson Mar 26 '17 at 17:07
• Also is there any issue with considering two treatment groups from the same meta-analysis as two "independent" studies? i.e. I have 10 studies that had a treatment and a control group, reporting HCC recurrence in each. Can I consider these two groups as separate studies when comparing to my treatment of interest (antiviral)? So the data would have 26 rows, 6 for antiviral, 10 for interferon, 10 for control but interferon and control were assessed in the same ten studies together (but on separate populations of course). – Scott Jackson Mar 26 '17 at 17:13
• I think @wolfgang is best placed to answer this but my feeling is you may need to a more multi-level approch using rma.mv – mdewey Mar 26 '17 at 19:32
• I am not 100% sure if I understand the analysis you want to do, but it does sound to me like you either need to use rma.mv() for a multilevel model or, if you want to stick to a binomial-normal model, you will have to use glmer() (from the lme4 package) directly. – Wolfgang Mar 27 '17 at 22:30