[R] binom.test

Francisco J. Zagmutt gerifalte28 at hotmail.com
Fri Oct 20 23:59:59 CEST 2006


Ethan,

You need to explain why you think this is "not the right function to use". R 
is doing exactly what you are asking it to do.  Now is up to you to choose 
the methodology you feel is correct.
For a good discussion on your particular issue I recommend you the following 
reference:

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

Once you figure out the "right function to use" see if the function is 
available in R.   If not readily available, and if after searching through 
R's documentation and the forum archives you still can't find a way to 
perform the calculation, then is time to get back to this forum.

Regards,

Francisco


Dr. Francisco J. Zagmutt
College of Veterinary Medicine and Biomedical Sciences
Colorado State University




>From: "Ethan Johnsons" <ethan.johnsons at gmail.com>
>To: r-help at stat.math.ethz.ch
>Subject: [R] binom.test
>Date: Fri, 20 Oct 2006 17:18:02 -0400
>
>A quick question, please.
>
>46 e coli lab samples are tested,  6 of them returned positive.
>
>So, the best point estimate for p is  6/46 = 0.1304348.
>
>For a 95% CI for p,  I thought binom.test would give me the correct
>result, but it seems it is not the right function to use.   What is
>the R function for this?
>
> > binom.test(x=6, n=46, p=4/16, conf.level = 0.95)
>
>         Exact binomial test
>
>data:  6 and 46
>number of successes = 6, number of trials = 46, p-value = 0.0621
>alternative hypothesis: true probability of success is not equal to 0.25
>95 percent confidence interval:
>  0.04940735 0.26256502
>sample estimates:
>probability of success
>              0.1304348
>
>thx much,
>
>ej
>
>______________________________________________
>R-help at stat.math.ethz.ch mailing list
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide 
>http://www.R-project.org/posting-guide.html
>and provide commented, minimal, self-contained, reproducible code.

_________________________________________________________________
Get today's hot entertainment gossip



More information about the R-help mailing list