Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

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


From   Nicola Orsini <[email protected]>
To   [email protected]
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/



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