|
AGRESTI COULLName:
In this context, we define success as "1" and failure as "0". Dataplot actually allows any two distinct values to be used. However, the larger value will always be considered "success" and the smaller value will always be considered "failure". If the variable contains more than two distinct values, an error is reported. The BINOMIAL PROPORTION command is used to compute a point estimate of the probability of success. Confidence intervals for the binomial proportion can be computed using a method recommended by Agresti and Coull and also by Brown, Cai and DasGupta (the methodology was originally developed by Wilson in 1927). This method solves for the two values of p0 (say, pupper and plower)) that result from setting z = α/2 and solving for p0 = pupper, and then setting z = -z = α/2 and solving for p0 = plower where zα/2 denotes the variate value from the standard normal distribution such that the area to the right of the value is α/2. The solution for the two values of p0 results in the following confidence intervals:
\( L. L. = \frac{\hat{p} + \frac{z_{\alpha/2}^{2}}{2n} - z_{\alpha/2}\sqrt{\frac{\hat{p}(1-\hat{p})}{n} + \frac{z_{\alpha/2}^{2}}{4n^2}}} {1 + z_{\alpha/2}^{2}/n} \) Another advantage is that the limits are in the (0,1) interval. This is not true for the frequently used normal approximation:
A one-sided confidence interval can also be constructed simply by replacing each zα/2 by zα in the expression for the lower or upper limit, whichever is desired.
<SUBSET/EXCEPT/FOR qualification> where <y> is the response variable; <par> is a parameter where the computed value is saved; and where the <SUBSET/EXCEPT/FOR qualification> is optional. This is for raw data case and <y> should contain a sequence of 0's and 1's. This returns the lower confidence limit for the two-sided Agresti-Coull interval.
<SUBSET/EXCEPT/FOR qualification> where <y> is the response variable; <par> is a parameter where the computed value is saved; and where the <SUBSET/EXCEPT/FOR qualification> is optional. This is for raw data case and <y> should contain a sequence of 0's and 1's. This returns the upper confidence limit for the two-sided Agresti-Coull interval.
<SUBSET/EXCEPT/FOR qualification> where <y> is the response variable; <par> is a parameter where the computed value is saved; and where the <SUBSET/EXCEPT/FOR qualification> is optional. This is for raw data case and <y> should contain a sequence of 0's and 1's. This returns the lower confidence limit for the one-sided lower tailed Agresti-Coull interval.
<SUBSET/EXCEPT/FOR qualification> where <y> is the response variable; <par> is a parameter where the computed value is saved; and where the <SUBSET/EXCEPT/FOR qualification> is optional. This is for raw data case and <y> should contain a sequence of 0's and 1's. This returns the upper confidence limit for the one-sided upper tailed Agresti-Coull interval.
LET A = TWO-SIDED UPPER AGRESTI COULL Y1 LET A = ONE-SIDED LOWER AGRESTI COULL Y1 LET A = ONE-SIDED UPPER AGRESTI COULL Y1 LET A = TWO-SIDED LOWER AGRESTI COULL Y1 SUBSET TAG > 2
The Brown, Cai, and DasGupta paper studied the coverage properties of various methods. They specifically recommend the Wilson, the adjusted Wald, and a Bayesion method based on a Jeffreys prior as having the best coverage properties. Specifically, they recommend the Wilson and Jeffreys methods for n ≤ 40. For n > 40, the methods have comparable performance. Although they recommend the adjusted Wald in this case, this is primarily for simplicity in classroom presentation. In any event, the March, 2014 version of Dataplot added the following command:
Whenever an Agresti-Coull interval is invoked in Dataplot, this command specifies which interval will be computed. The adjusted Wald interval is
where
\(\tilde{n} = n + (\Phi^{-1}(1 - \alpha/2))^{2}\) \(\tilde{p} = \frac{\tilde{X}} {\tilde{n}}\) \(\Phi^{-1}\) is the percent point function of the normal distribution Note that the adjusted Wald method is never shorter than the Wilson interval. The Jeffreys interval (the derivation for this interval is given in the Brown, Cai, DasGupta paper) is
UCL = BETPPF(1 - α/2,n - X + 0.5) where BETPPF is the percent point function of the beta distribution and X is the number of successes. The default method is the Wilson interval.
The default value of alpha is 0.95.
These various commands are actually where the AGRESTI COULL statistics are most commonly used.
This command is a Math Let Subcommand rather than a Statistics LET Subcommand. The distinctions are:
Which form of the command to use is determined by the context of what you are trying to do. For details on the "Math" version of the command, enter
Brown, L. D. Cai, T. T. and DasGupta, A. (2001), "Interval estimation for a binomial proportion," Statistical Science, 16(2), 101-133. Wilson (1927), "Probable inference, the law of succession, and statistical inference," Journal of the American Statistical Association, Vol. 22, pp. 209-212.
2014/3: Support for SET BINOMIAL METHOD command LET N = 1 LET P = 0.8 LET ALPHA = 0.95 LET Y = BINOMIAL RANDOM NUMBERS FOR I = 1 1 50 LET AL = ONE SIDED LOWER AGRESTI COULL Y LET AU = ONE SIDED LOWER AGRESTI COULL Y LET BL = TWO SIDED LOWER AGRESTI COULL Y LET BU = TWO SIDED LOWER AGRESTI COULL Y PRINT AL AU BL BUThe following output is generated. AL -- 0.6706774E+00 AU -- 0.8605760E+00 BL -- 0.6475845E+00 BU -- 0.8724608E+00
|
Privacy
Policy/Security Notice
NIST is an agency of the U.S.
Commerce Department.
Date created: 10/05/2010 |