From ripley@stats.ox.ac.uk  Wed Mar 13 17:17:40 2002
From: ripley@stats.ox.ac.uk (ripley@stats.ox.ac.uk)
Date: Wed, 13 Mar 2002 17:17:40 +0000 (GMT)
Subject: [Rd] rbinom silently rounds size argument (PR#1377)
In-Reply-To: <Pine.A41.4.44.0203130901320.83416-100000@homer34.u.washington.edu>
Message-ID: <Pine.LNX.4.31.0203131713490.5107-100000@gannet.stats>

Read the subject again, please.

pbinom(2, size=4.1, p=0.5)

makes no sense, but R 1.4.1 gave the result for (2, 4, 0.5) (and S+6 gives
NA).

On Wed, 13 Mar 2002, Thomas Lumley wrote:

> On Wed, 13 Mar 2002 ripley@stats.ox.ac.uk wrote:
>
> > Fixed for 1.5.0.  Note that pbinom and qbinom did it too.
> >
>
> But isn't it right for pbinom and qbinom to do it?  P(X<=4.5) is a
> perfectly reasonable quantity and is equal to P(X<=4) if X is binomial and
> (with rounding the other way) the same for quantile functions.
>
> dbinom, OTOH, is a density wrt counting measure and is not defined for
> non-integers (though one could make a case for zero).
>
> 	-thomas
>
>

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


[Rd] rbinom silently rounds size argument (PR#1377)
ripley@stats.ox.ac.uk