Can I get an Odds Ratio (or other effect size) from two proportions and a p-value? I am conducting a meta analysis that is comparing dichotomous outcomes for two groups.  So for each study, I have the proportion of the outcome for both groups and the sample size of each group, and I am using Comprehensive Meta Analysis software to get the odds ratio for each.
One study that I would like to include if possible only provided the proportions (42% in group A and 51% in group B) and the p-value (p=.03).  I believe he p-value only depends on the proportion and sample size (which is all you need to construct a 2x2 contingency table), so I would assume one could reverse engineer the sample size from the p-value.  However, I have not found a formula to do so, and it is not an option in my software to enter this data (though it includes many other options like "chi-square and sample size" or "sample size and p-value").  I'm not sure if perhaps you'd need to know the test they used as well, like Z-test for proportions or fisher's exact test.
Does anyone know how to reverse-compute the sample size given this data? I know that a study that didn't even report the overall sample size is not a great paper (non-peer reviewed journal), but we want our meta-analysis to be comprehensive and include everything out there, included unpublished (and thus also not peer-reviewed) studies.
 A: Assuming that the p-value reported is based on a chi-square test of independence (which is equivalent to the standard test of the equality of the two proportions) and assuming that the two groups are of equal size, we can indeed figure out (at least approximately) what the original data looked like.
### total sample size (determined via trial-and-error)
n <- 622

### observed proportions
p1 <- .42
p2 <- .51

### create 2x2 contingency table
tab <- round(matrix(c(p1*n/2, (1-p1)*n/2, p2*n/2, (1-p2)*n/2), byrow=TRUE, nrow=2))
tab

This yields:
     [,1] [,2]
[1,]  131  180
[2,]  159  152

Now let's apply the chi-square test:
chisq.test(tab)

This yields:
        Pearson's Chi-squared test with Yates' continuity correction

data:  tab
X-squared = 4.7096, df = 1, p-value = 0.03

There is that p-value of 0.03. And the OR is then:
(tab[1,1] * tab[2,2]) / (tab[1,2] * tab[2,1])

Which is:
[1] 0.6957372

If one wants to be fancy, one can easily write a function that determines n via a simple root-finding algorithm automatically. But for a one-shot application, it's easy to determine n via trial-and-error.
Also note that the table obtained may only approximate the real data. The reported proportions and p-value are likely to be rounded, which introduces some uncertainty. But this should give you something close enough to work with.
