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]

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


From   Philip Jones <[email protected]>
To   Statalist <[email protected]>
Subject   Re: st: No cii error: was "manually calculating confidence interval for a proportion"
Date   Tue, 16 Jul 2013 11:25:41 -0400

Steve,

Thank you for the follow-up. I had been wondering the same thing after
reading your original post. Nice to know the answer.

Phil

On Tue, Jul 16, 2013 at 11:15 AM, Steve Samuels <[email protected]> wrote:
> 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/
*
*   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