# st: re: CI Question

 From Roger Newson To statalist@hsphsun2.harvard.edu Subject st: re: CI Question Date Fri, 25 Jul 2003 17:35:08 +0100

```At 10:16 25/07/03 -0400, Laura Novelli wrote:
```
```Is there a way to calculate an upper 95% CI bound if the relative risk
(from a 2x2 table) is equal to zero?
```
Not for the relative risk, but you can for the odds ratio. Unfortunately, you don't seem to be able to do that in Stata's -cci- command, either. If you type

. cci 0 1 1 0,exact

then the results look as follows:

Proportion
| Exposed Unexposed | Total Exposed
-----------------+------------------------+----------------------
Cases | 0 1 | 1 0.0000
Controls | 1 0 | 1 1.0000
-----------------+------------------------+----------------------
Total | 1 1 | 2 0.5000
| |
| Point estimate | [95% Conf. Interval]
|------------------------+----------------------
Odds ratio | 0 | 0 . (Cornfield)
Prev. frac. ex. | 1 | . 1 (Cornfield)
Prev. frac. pop | . |
+-----------------------------------------------
1-sided Fisher's exact P = 0.5000
2-sided Fisher's exact P = 1.0000

Note: exact confidence levels not possible with zero count cells

The unofficial Stata command -exactcci- produces similarly disappointing results. So it seems that Stata can't do this. (Somebody correct me if I'm wrong.)

This is a great pity, if it is the case. However, I know for a fact that you can get CIs around a zero odds ratio using EpiInfo. If you type into EpiInfo the table I typed into -cci-, you get an odds ratio of 0.00, with the so-called "exact" confidence limits 0.00 to 39.00. (These confidence limits are not really exact, but they are guaranteed to be, if anything conservative. The reference for the formula is Mehta et al., 1985.) So it looks as if the way to go is to use EpiInfo for the time being, and hope, in the long run, that Stata will catch up with EpiInfo. EpiInfo can be downloaded for free from
http://www.cdc.gov/epiinfo/Epi6/ei6.htm
For what it's worth, EpiInfo can handle zero odds ratios, but not infinite odds ratios. I once wrote a SAS macro which handles both zero and infinite odds ratios, and I should be able to dig it out of my floppy disk archives if anybody wants a copy. However, if anybody at StataCorp is listening, then it looks as if CIs for zero and infinite odds ratios should be on a wish list, and possibly should be programmed at the C executable level rather than at the ado-file level, and certainly could be a good use for Stata 8's multiple missing values.

I hope this helps.

Best wishes

Roger

References

Mehta CR, Patel NR, Gray R. Computing an exact confidence interval for the common odds ratio in several 2x2 contingency tables. Journal of the American Statistical Association 1985; 80:: 969-973.

--
Roger Newson
Lecturer in Medical Statistics
Department of Public Health Sciences
King's College London
5th Floor, Capital House
42 Weston Street
London SE1 3QD
United Kingdom

Tel: 020 7848 6648 International +44 20 7848 6648
Fax: 020 7848 6620 International +44 20 7848 6620
or 020 7848 6605 International +44 20 7848 6605
Email: roger.newson@kcl.ac.uk
Website: http://www.kcl-phs.org.uk/rogernewson

Opinions expressed are those of the author, not the institution.

*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/