Re: [Rd] qbinom returns NaN

2005-11-23 Thread Prof Brian Ripley
This is a very simple change at C level: the !R_FINITE(p) test is incorrect for log_p != 0. Changed now. On Wed, 23 Nov 2005, Spencer Graves wrote: > Hi, All: > > For most but not all cases, qbinom is the inverse of pbinom. > Consider the following example, which generates an exception

[Rd] qbinom returns NaN

2005-11-23 Thread Spencer Graves
Hi, All: For most but not all cases, qbinom is the inverse of pbinom. Consider the following example, which generates an exception: > (pb01 <- pbinom(0:1, 1, .5, log=T, lower.tail=FALSE)) [1] -0.6931472 -Inf Since "lower.tail=FALSE", Pr{X>1} = 0 in this context, and l