Exact and mid-p confidence intervals for the odds ratio

The odds ratio is a frequently used effect measure for two independent binomial proportions. Unfortunately, the confidence intervals that are available for it in Stata and other standard software packages are generally wider than necessary, particularly for small-sample and exact estimation. The performance of the Cornfield exact interval—the only widely available exact interval for the odds ratio—may be improved by incorporating a small modification attributed to Baptista and Pike (1977, Journal of the Royal Statistical Society, Series C 26: 214–220). A further improvement is achieved when the Baptista Pike method is combined with the mid-p approach. In this article, I present the command merci (mid-p and exact odds-ratio confidence intervals) and its immediate version mercii, which calculate the Cornfield exact, Cornfield mid-p, Baptista–Pike exact, and Baptista Pike mid-p confidence intervals for the odds ratio. I compare these intervals with three well-known logit intervals. I strongly recommend the Baptista–Pike mid-p interval.

Issue Date:
Publication Type:
Journal Article
DOI and Other Identifiers:
st0271 (Other)
Record Identifier:
PURL Identifier:
Published in:
Stata Journal, Volume 12, Number 3
Page range:
Total Pages:

Record appears in:

 Record created 2017-04-01, last modified 2018-01-23

Download fulltext

Rate this document:

Rate this document:
(Not yet reviewed)