{smcl} {* 08sep2004}{...} {hline} help for {hi:bincoverage} {hline} {title:True coverage probabilities for binomial confidence intervals} {p 8 12 2}{cmd:bincoverage} [{cmd:,} {cmd:n(}{it:#}{cmd:)} {cmd:p(}{it:#}{cmd:)} {cmdab:l:evel:(}{it:#}{cmd:)} {cmdab:exa:ct} {cmdab:w:ilson} {cmdab:a:gresti} {cmdab:j:effreys}]{break} {title:Description} {p 4 4 2} {cmd:bincoverage} calculates true coverage probabilities for various binomial confidence intervals, the Clopper-Pearson ({cmd:exact}) interval, the Wilson ({cmd:wilson}) interval, the Agresti ({cmd:agresti}) interval, and the Jeffreys ({cmd:jeffreys}) interval. {p 4 4 2} For a given binomial experiment with {it:n} trials and probability of success {it:p} for each trial, coverage probabilities are obtained by first determining the set of binomial outcomes (from the set 0,1,...,{it:n}) resulting in confidence intervals which cover {it:p}. The coverage probability is then simply the sum of the binomial({it:n},{it:p}) density over these outcomes. {title:Options} {p 4 8 2}{cmd:n(}{it:#}{cmd:)} specifies {it:n}, the number of Bernoulli trials. By default, {it:n} is 10. {p 4 8 2}{cmd:p(}{it:#}{cmd:)} specifies {it:p}, the success probability of each trial. By default, {it:p} is 0.5. {p 4 8 2}{cmd:level(}{it:#}{cmd:)} specifies the confidence level, in percent, for confidence intervals; see help {help level}. {p 4 8 2} {cmd:exact}, {cmd:wilson}, {cmd:agresti}, and {cmd:jeffreys} specify how the binomial confidence intervals are to be calculated. At most one may be specified. {p 8 8 2} {cmd:exact} is the default and specifies exact binomial confidence intervals. {p 8 8 2} {cmd:wilson} specifies calculation of the Wilson confidence intervals. {p 8 8 2} {cmd:agresti} specifies calculation of the Agresti-Coull confidence intervals. {p 8 8 2} {cmd:jeffreys} specifies calculation of the Jeffreys confidence intervals. {p 8 8 2} See Brown, Cai, and DasGupta (2001) for a discussion and comparison of the different confidence intervals. {title:Examples} {cmd:. bincoverage, n(100)} {cmd:. bincoverage, n(500) p(0.3) wilson} {cmd:. bincoverage, n(500) p(0.2) agresti level(90)} {title:References} {p 4 8 2} Brown, L.D., T.T. Cai, and A. DasGupta. 2001. Interval estimation for a binomial proportion, {it:Statistical Science} 16: 101{c -}133. {title:Also see} Manual: {hi:[R] ci} {p 4 13 2} Online: help for {help ci}.