Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: No cii error: was "manually calculating confidence interval for a proportion"


From   Steve Samuels <[email protected]>
To   [email protected]
Subject   st: No cii error: was "manually calculating confidence interval for a proportion"
Date   Tue, 16 Jul 2013 10:15:50 -0500

I mistakenly believed there was an error in -cii-, because:

. cii 484 157 

gave an exact 95% binomial Conf. Interval of 

 .2828241    .3680983

while what I thought was the direct calculation 
gave a different result.


. di  invbinomial(484, 157, .975)
.28480917  <- doesn't match
. di  invbinomial(484, 157, .025)
.36809825

I was wrong about the direct calculation.

Isabelle Canette of StataCorp wrote:

"According to our documentation (section "Methods and Formulas" for
-ci-), p1 should verify:

P(K>=k | p=p1) = alpha/2

Provided that the variable K is discrete, this means:

P(K<=k-1 | p = p1) = 1- alpha/2

therefore, p1 should be obtained as:

di invbinomial(484, 156, .975)"



Steve




*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index