# [R-meta] Questions about the use of metaprop for the pooling of proportions

Thiago Roza roz@@h@th|@go @end|ng |rom gm@||@com
Tue Mar 8 23:13:09 CET 2022

```Dear Gerta and Wolfgang,

Thank you for the replies!
The fixed model works just fine for my multinomial data (the sum of
the proportions of all suicide methods is now 100!).
I think that in this case, I will use the random-effects model for the
binomial data in metaprop and the fixed effects model for the
multinomial data!

Thiago

Em ter., 8 de mar. de 2022 às 19:06, Dr. Gerta Rücker
<ruecker using imbi.uni-freiburg.de> escreveu:
>
> Hi Wolfgang,
>
> Thank you! Indeed I just saw that the ML estimate under the binomial
> model and the assumption of homogeneity gives (sum r_i)/(sum n_i). In
> fact this seems equivalent to logistic regression. Probably it works
> also under the multinomial model, I didn't write this down. I admit that
>
> Best,
>
> Gerta
>
> Am 08.03.2022 um 22:58 schrieb Viechtbauer, Wolfgang (SP):
> > Hi Gerta,
> >
> > Under homogeneity, we have X_i ~ Binomial(n_i, pi), in which case sum(X_i) ~ Binomial(sum(n_i), pi) and hence
> >
> > sum(out1)/sum(n)
> > plogis(coef(glm(out1/n ~ 1, weights = n, family = binomial)))
> >
> > or using metaprop() / rma.glmm()
> >
> > plogis(metaprop(out1, n)\$TE.fixed)
> > plogis(coef(rma.glmm(measure="PLO", xi=out1, ni=n, method="EE")))
> >
> > are all identical. It goes to show how the logistic regression approach gives an 'exact' model, based on the exact distributional properties of binomial counts.
> >
> > As for Thiago's data: I think this is fine. But essentially he has multinomial data. I recently described in a post how such data could be addressed if one would want to analyze them all simultaneously:
> >
> > https://stat.ethz.ch/pipermail/r-sig-meta-analysis/2022-February/003878.html
> >
> > Best,
> > Wolfgang
> >
> >> -----Original Message-----
> >> From: R-sig-meta-analysis [mailto:r-sig-meta-analysis-bounces using r-project.org] On
> >> Behalf Of Dr. Gerta Rücker
> >> Sent: Tuesday, 08 March, 2022 20:30
> >> To: Thiago Roza
> >> Cc: r-sig-meta-analysis using r-project.org
> >> Subject: Re: [R-meta] Questions about the use of metaprop for the pooling of
> >> proportions
> >>
> >> Dear Thiago,
> >>
> >> I found that, apparently, the result presented by the common effect
> >> model (=fixed effect model) is simply the sum of all entries/events over
> >> all studies, divided by the total sample size (summed up over all
> >> studies). You see this by typing the following after the code in my last
> >> e-mail:
> >>
> >> all.equal(sum(out1)/sum(n), plogis(m1\$TE.fixed))
> >> all.equal(sum(out2)/sum(n), plogis(m2\$TE.fixed))
> >> all.equal(sum(out3)/sum(n), plogis(m3\$TE.fixed))
> >>
> >> This means that the method is equivalent to considering the data as a
> >> contingency table where the rows correspond to the studies and the
> >> columns to the outcomes. The meta-analytic result corresponds to the
> >> percentages in the column sums, and of course these add to 100%. In fact
> >> this is the easiest way to deal with this kind of data.
> >>
> >> @Guido, @Wolfgang: I couldn't find thisinformation on the metaprop or
> >> the rma.glmm help pages. Do you see any problem with interpreting
> >> Thiago's data as a contingency table? I think that, by contrast to
> >> pairwise comparison data, confounding/ecological bias is not an issue here.
> >>
> >> Best,
> >>
> >> Gerta
> >>
> >> Am 08.03.2022 um 19:30 schrieb Dr. Gerta Rücker:
> >>> Dear Thiago,
> >>>
> >>> So you have proportions of several mutually exclusive outcomes. Of
> >>> course, these are dependent because the sum is always the total
> >>> numbers of cases in the study (corresponding to 100% in that study).
> >>> Nevertheless, I don't see any reason why not pooling each outcome
> >>> separately using metaprop(). In fact, depending on the transformation,
> >>> the resulting average proportion will not generally sum up to 100%,
> >>> particularly not when using no transformation at all. This raises the
> >>> question which transformation to choose. The default in metaprop() is
> >>> random intercept logistic regression model with transformation logit.
> >>>
> >>> I made an observation that I have to think about, and you may try
> >>> this. If I use the default, the sum of the pooled percentages over all
> >>> outcomes is indeed always 1 for the fixed effect estimate. I used code
> >>> like this (here for 3 outcomes):
> >>>
> >>> #### Random data ####
> >>> out1 <- rbinom(10,100,0.1)
> >>> out2 <- rbinom(10,100,0.5)
> >>> out3 <- rbinom(10,100,0.9)
> >>> n <- out1 + out2 + out3
> >>> m1 <- metaprop(out1, n)
> >>> m2 <- metaprop(out2, n)
> >>> m3 <- metaprop(out3, n)
> >>> plogis(m1\$TE.fixed) + plogis(m2\$TE.fixed) + plogis(m3\$TE.fixed)
> >>>
> >>> (plogis is the inverse of the logit transformation, often called
> >>> "expit": plogis(x) = exp(x)/(1 + exp(x).) These seem to sum up to 1
> >>> for the fixed effect estimates, but not in general for the random
> >>> effects estimates, only in case of small heterogeneity (which is
> >>> rarely the case with proportions).
> >>>
> >>> I am interested to hear whether this works with your data. (And I have
> >>> to prove that this holds in general ...)
> >>>
> >>> Best,
> >>>
> >>> Gerta
>
> --
>
> Dr. rer. nat. Gerta Rücker, Dipl.-Math.
>
> Guest Scientist
> Institute of Medical Biometry and Statistics,
> Faculty of Medicine and Medical Center - University of Freiburg
>
> Zinkmattenstr. 6a, D-79108 Freiburg, Germany
>
> Mail:     ruecker using imbi.uni-freiburg.de
> Homepage: https://www.uniklinik-freiburg.de/imbi-en/employees.html?imbiuser=ruecker
>

```