[R] binom.test

Kevin E. Thorpe kevin.thorpe at utoronto.ca
Thu Oct 19 18:43:42 CEST 2006


See also the binconf function in the Hmisc package.

Ethan Johnsons wrote:
> R-experts:
> 
> A quick question, please.
> 
>>From a lab exp, I got 12 positives out of 50.
> To get 90% CI for this , I think binom.test might be the one to be used.
> Is there a better way or function to calculate this?
> 
>> binom.test(x=12, n=50, p=12/50, conf.level = 0.90)
> 
>         Exact binomial test
> 
> data:  12 and 50
> number of successes = 12, number of trials = 50, p-value = 1
> alternative hypothesis: true probability of success is not equal to 0.24
> 90 percent confidence interval:
>  0.1447182 0.3596557
> sample estimates:
> probability of success
>                   0.24
> 
> thx much
> 
> ej
> 


-- 
Kevin E. Thorpe
Biostatistician/Trialist, Knowledge Translation Program
Assistant Professor, Department of Public Health Sciences
Faculty of Medicine, University of Toronto
email: kevin.thorpe at utoronto.ca  Tel: 416.946.8081  Fax: 416.946.3297



More information about the R-help mailing list