Error in ppois function (PR#161)
p.dalgaard@biostat.ku.dk
p.dalgaard@biostat.ku.dk
Fri, 9 Apr 1999 10:55:56 +0200
ripley@stats.ox.ac.uk writes:
> and R-0.64.1 does
>
> > ppois(1.5, 2)
> [1] 0.4060058
> > ppois(1.1, 2)
> [1] 0.4060058
> > dpois(1.1, 2)
> Warning: non-integer x = 1.100000
> [1] 0
>
> Happy?
Almost. Do you use round(x) - x < 1e-7 or some such as criterion for
"integer"? (although I'd be hard pressed to come up with a natural
example where the argument to dpois is subject to FP accuracy issues)
--
O__ ---- Peter Dalgaard Blegdamsvej 3
c/ /'_ --- Dept. of Biostatistics 2200 Cph. N
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk) FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._