All this discussion about failure of binomial confidence intervals to give
"exact" coverage also applies to the Fisher "exact" test, whose actual level
(probability of rejecting the null hypothesis of equal proportions, when in
fact the proportions are equal) is usually less than the nominal level,
depending on the true proprtions. In the frequentist setting, it's the same
problem - there are only a finite number of possible outcomes.
Al Feiveson
-----Original Message-----
From: [email protected]
[mailto:[email protected]]On Behalf Of Joseph Coveney
Sent: Wednesday, September 08, 2004 11:56 PM
To: Statalist
Subject: Binomial confidence intervals (more)
Nick Cox wrote:
A small tweak to Joseph's useful program.
It feeds on a given sample size and
population proportion, but irrespective
of the latter 0.5 is wired in to a crucial
line. So I suggest
return scalar `method'_covered =
(`pi' >= r(lb)) & (`pi' <= r(ub))
-inrange(`pi', r(lb), r(ub))- is a
another way of doing it.
----------------------------------------------------------------------------
Whoops--thanks Nick!
It started out fixed at 0.5 throughout; it originally was intended only as
an illustration where listers could see in the Stata code (invoking the
definition of the term, confidence interval) the difference between
probability of coverage, which was Bobby Gutierrez's point, and *exact* in
Constantine Daskalakis's sense. For the purpose of the illustration, the
true proportion was arbitrarily fixed at 0.5 in the original code. When
Paul Seed posted his question, the original purpose was abandoned, and I
tried--alas, too hastily--to generalize the program for another purpose: a
further illustration of the versatility of simulation to answer questions in
the absence of alternative means.
Thanks also (and to Bobby) for making -bincoverage- available as one such
alternative means. It is certainly preferable to simulation for practical
work.
Joseph Coveney
*
* 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/
*
* 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/