Odds ratio is usually calculated from 2x2 table and looks to have quite unique combination of the resulting statistics and confidence interval values for each number combination (or number ratios) in 2x2 table.

Is it possible to recover original numbers of 2x2 table from odds ratio with given 95% confidence interval?

i.e.: OR=2.252; 95% CI = 0.932 -- 5.439

Is it possible to get number of observations from this data?

Is it possible to recover original numbers WITH given total number of observations?

i.e. 133 for the case above

P.S. Original table:

                positive    negative
exposed         14          39
not exposed     11          69

Is it possible to do it in R?


Short answer no, different margins can produce the same odd's ratio and confidence interval. Some examples to follow.

Here is a brief sketch of how to find the minimum possible N for the table. Note that as per your linked site, the standard error can be related to the cell contents by:

$$\text{SE} = \sqrt{\frac{1}{a} + \frac{1}{b} + \frac{1}{c} + \frac{1}{d}}$$

Ignoring the actual odds ratio, this value is minimized when $a = b = c = d$. This then produces the relationship:

$$\text{SE}^2 = \frac{1}{n/4} + \frac{1}{n/4} + \frac{1}{n/4} + \frac{1}{n/4} = \frac{4}{n/4} = \frac{16}{n}$$

So subsequently we can estimate the minimum possible N for a table as $16/\text{SE}^2$. In your example, the standard error can be recovered by the 95% confidence interval:

$$[\log(\text{High}) - \log(\text{Low})]/[2 \cdot 1.96]$$

Which is just over $0.45$, and so the minimum possible N a table can have with that standard error is $16/0.45^2 = 80$ (taking the ceiling of this value).

This logic though won't help with finding the maximum. Let's say one row of the table, $c$ and $d$, have really large values. Thus ($1/c + 1/d) \approx 0$, and so we just have:

$$\text{SE}^2 = \frac{1}{a} + \frac{1}{b}$$

Let's say that $c/d = 4/9$, so to get an odds ratio of 2.25 we just need $a = b$. So for this example $\text{SE}^2 = 2/a$, and so $a \approx 10$. So the table below:

                positive    negative
exposed         10          10
not exposed     4e6         9e6

Produces an odd's ratio of 2.25 and a 95% CI of 0.9365 to 5.4058.

Finally, even if you had the total N for the table, there is a symmetry in the standard error, you can simply swap the row totals and recalculate the cells to have the same odd's ratios. In many situations this will produce approximately the same standard error.

So we could rewrite your original table:

                positive    negative
exposed         14          39
not exposed     11          69


                positive    negative
exposed         23          57
not exposed      8          45

Which produces an odds ratio of 2.2697 and a 95% confidence interval of 0.9280 to 5.5516. Not exactly the same, but to a certain extent this identification is dependent on the amount of rounding in the reporting, so I would be hesitant to rely on it, and with larger row totals it will be progressively harder to find the exact N.

If you know the N, you could always do a grid search, but I do not believe it will always result in a unique solution.

I've even forgot the most obvious symmetry, you can simply flip the numbers on the diagonals of the table and still obtain the exact same odds ratio and standard error. E.g.

                positive    negative
exposed         69          11
not exposed     39          14

results in the same summary statistics as your original table.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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