[R] Incorrect p value for binom.test?

2009-02-05 Thread Michael Grant
I believe the binom.test procedure is producing one tailed p values rather than the two tailed value implied by the alternative hypothesis language. A textbook and SAS both show 2*9.94e-07 = 1.988e-06 as the two tailed value. As does the R summation syntax from R below. It looks to me like the

Re: [R] Incorrect p value for binom.test?

2009-02-05 Thread Peter Dalgaard
Michael Grant wrote: I believe the binom.test procedure is producing one tailed p values rather than the two tailed value implied by the alternative hypothesis language. A textbook and SAS both show 2*9.94e-07 = 1.988e-06 as the two tailed value. As does the R summation syntax from R below.

Re: [R] Incorrect p value for binom.test?

2009-02-05 Thread Albyn Jones
The computation 2*sum(dbinom(c(10:25),25,0.061)) does not correspond to any reasonable definition of p-value. For a symmetric distribution, it is fine to use 2 times the tail area of one tail. For an asymetric distribution, this is silly. The standard definition given in elementary texts is

Re: [R] Incorrect p value for binom.test?

2009-02-05 Thread Thomas Lumley
On Thu, 5 Feb 2009, Albyn Jones wrote: The computation 2*sum(dbinom(c(10:25),25,0.061)) does not correspond to any reasonable definition of p-value. For a symmetric distribution, it is fine to use 2 times the tail area of one tail. For an asymetric distribution, this is silly. Silly is much