[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

From |
Nicola Orsini <nicola.orsini@imm.ki.se> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: New package on SSC: -eclpci- |

Date |
Tue, 28 Jun 2005 11:03:49 +0200 |

Hi Roger,

thanks for your question. The lower and upper bounds are almost the same, it depends on how many decimals you consider

. qui eclpci 10 1000

. ret list

scalars:

r(ub) = .0183903560420175

r(lb) = .0047953886961324

r(obs) = 10

macros:

r(cmd) : "eclpci"

. qui cii 1000 10, poisson

. ret list

scalars:

r(se) = .0031622776601684

r(mean) = .01

r(N) = 1000

r(ub) = .0183903558869087

r(lb) = .0047953887792498

The lower and upper bounds are not exactly the same because -eclpci- and -cii- use different ways to get the results.

The command -cii- calculates the exact confidence interval using an iterative algorithm (viewsource _crccip.ado), Newton's method, see [R] -ci- pag 213 (Stata 9 manual). It uses the probability function -dgammapdx- and -gammap-.

The command -eclpci- calculates an exact confidence interval without an iterative algorithm, just two lines of code (viewsource eclpci.ado), using the probability function -invgammap-, as described by

Daly, L., Simple SAS macros for the calculation of exact binomial and Poisson confidence limits, Comput Biol Med 22:351-361, 1992.

Furthemore, the command -eclpci- has several options to calculate approximate confidence intervals, as described by

Breslow NE, Day NE., Statistical Methods in Cancer Research: Volume II, The Design and Analysis of Cohort Studies. Lyon: International Agency for Research on Cancer, 1987, p.69.

It's quite simple to use -eclpci- to reproduce Table 1 pag 7 of

http://www.doh.wa.gov/Data/Guidelines/WordDocs/CI_guidelines.pdf

forv i = 0(1)99 {

eclpci `i'

}

I wrote -eclpci- with epidemiologists in mind and I hope it can be useful.

Best,

Nicola

Hi Nicola,

Could you clarify how this differs from official Stata's -cii #exposure #events , poisson- ?

. eclpci 10 1000, format(%9.0g)

SMR: .01 95% CI[ .0047954, .0183904]

. cii 1000 10, poisson

-- Poisson Exact --

Variable | Exposure Mean Std. Err. [95% Conf. Interval]

---------+------------------------------------------------------

| 1000 .01 .0031623 .0047954 .0183904

Thanks,

Roger.

* * 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/

**References**:**Re: st: New package on SSC: -eclpci-***From:*Roger Harbord <roger.harbord@bristol.ac.uk>

- Prev by Date:
**Re: st: Re: How to list just the first case meeting a selection criterion?** - Next by Date:
**Re: st: Re: How to list just the first case meeting a selection criterion?** - Previous by thread:
**Re: st: New package on SSC: -eclpci-** - Next by thread:
**st: RE: help in merging files** - Index(es):

© Copyright 1996–2016 StataCorp LP | Terms of use | Privacy | Contact us | What's new | Site index |