# [R-meta] Difference in Proportions Meta-Analysis

Viechtbauer, Wolfgang (SP) wo||g@ng@v|echtb@uer @end|ng |rom m@@@tr|chtun|ver@|ty@n|
Wed Jun 10 16:13:06 CEST 2020

```Hi Nelly,

Don't you have the sample size on which the proportions are based? If not, the standard error of a proportion is SE[p] = sqrt[p(1-p)/n], so given p and SE[p], one can easily recover the sample size with n = p(1-p) / SE^2. Do this for both groups. Call the resulting sample sizes n1i and n2i. Also compute the number events with p*n. Do this for both groups. Call the resulting event counts ai and ci. Now you have everything to use escalc(measure="OR", ai, n1i, ci, n2i).

Best,
Wolfgang

>-----Original Message-----
>From: ne gic [mailto:negic4 using gmail.com]
>Sent: Wednesday, 10 June, 2020 13:13
>To: Viechtbauer, Wolfgang (SP)
>Cc: r-sig-meta-analysis using r-project.org
>Subject: Re: [R-meta] Difference in Proportions Meta-Analysis
>
>Dear Wolfgang,
>
>I have taken time to read the entire escalc documentation
>(https://wviechtb.github.io/metafor/reference/escalc.html ) and I am sorry
>to say I don't understand how I can do that in a single step with
>escalc(measure="OR", ...) as you previously mentioned. I would like to do
>this correctly following your suggestion so as to minimize any errors as I
>redo steps that can be done in fewer steps.
>
>For each of my two groups I have proportion and standard error. Could you
>kindly show me how I can do this using one of the available datasets please?
>
>Sincerely,
>nelly
>
>On Mon, Jun 8, 2020 at 6:48 PM Viechtbauer, Wolfgang (SP)
><wolfgang.viechtbauer using maastrichtuniversity.nl> wrote:
>No, this is not correct. You should not apply the logit-transformation to
>the difference and the SE is not correct either. You should apply the logit-
>transformation to the two proportions individually, compute the correct SE
>of the logit-transformed proportions, take the difference between the two
>logit-transformed proportions, and then you can use the equation to get the
>SE of this difference. But all of this can just be done in a single step
>with escalc(measure="OR", ...). As I mentioned, the difference between two
>logit-transformed proportions is the log odds ratio.
>
>Best,
>Wolfgang
```