Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

RE: st: prtest confidence interval


From   Kenneth A Knapp <kenneth.knapp@shu.edu>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   RE: st: prtest confidence interval
Date   Sun, 11 Nov 2012 11:21:51 -0500

Steve, thanks so much for your help.
Ken K
Seton Hall
________________________________________
From: owner-statalist@hsphsun2.harvard.edu [owner-statalist@hsphsun2.harvard.edu] On Behalf Of Steve Samuels [sjsamuels@gmail.com]
Sent: Saturday, November 10, 2012 11:08 PM
To: statalist@hsphsun2.harvard.edu
Subject: Re: st: prtest confidence interval

The Manual entry for -prtest- shows the formula that it uses the normal
approximation. This approximation doesn't "know" that the binomial CIs
should be in [0,1]. Also the confidence intervals based on the
approximation are bad unless "n" is large, especially for high and low
values of the unknown probability (Brown et al., 2001). So the answer to
your first question is "No" and the answer to your second is "Yes".

For CIs, the "exact" confidence intevals (Clopper-Pearson) are very
conservative. (Agresti & Coul, 1998). I recommend -ci- with the
-binomial- and -agresti- option. Also, if you are interested in a test
p-value, run -bitest- with the -detail- option and construct your own
mid-p-value (Agresti, 2002, p. 20) using the returned results

Steve


Agresti, A., and B.A. Coull. 1998. Approximate is better than “exact”
for interval estimation of binomial proportions. The American
Statistician 52, no. 2: 119-126.

Agresti, A. 2002. Categorical data analysis. Hoboken, NJ:
Wiley-interscience.

Brown, L.D., T.T. Cai, and A. DasGupta. 2001. Interval estimation for a binomial proportion. Statistical Science 101-117.
available at: http://www.ic.unicamp.br/~wainer/cursos/2s2009/1009213286.pdf

Steve

On Nov 10, 2012, at 4:17 PM, Kenneth A Knapp wrote:

For a binary variable, to get a confidence interval I include the "binomial" option:
ci variable, binomial
(variable is  the name of a binary variable)

Trouble is, when I exectute:
prtest variable==X
(X is a number between 0 and 1)
the reported confidence interval doesn't match the interval obtained from "ci variable, binomial"
Rather, the reported confidence interval is the same as I get when I execute "ci viariable" -- that is, the ci command without the "binomial" option.

A particular binary variable I am working with has an upper bound confidence interval > 1 when I execute "ci" without the binomial option.

Any way to correct prtest so that the confidence intervals reported match those you get when you execute ci with the binomial option?
Is such a correction even needed?

Any help would be very much appreciated.
Ken K
Seton Hall
*
*   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/

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index