From @okol @ending from in@@-toulou@e@fr  Wed Dec  5 10:08:47 2018
From: @okol @ending from in@@-toulou@e@fr (Serguei Sokol)
Date: Wed, 5 Dec 2018 10:08:47 +0100
Subject: [Rd] Bug report: Function ppois(0:20,
 lambda=0.9) does not generate a non-decreasing result.
In-Reply-To: <23558.50073.837856.602176@stat.math.ethz.ch>
References: <f49f51f.a07fd.16774649817.Coremail.qweytr1@mail.ustc.edu.cn>
 <CALEXWq1WFLzQBgm8oF1myry25DZEyEA_jT3kFEnLYP55-06QKg@mail.gmail.com>
 <2787db5d-a009-40f5-bea6-8ddb10b10a50@insa-toulouse.fr>
 <23558.50073.837856.602176@stat.math.ethz.ch>
Message-ID: <77ce5483-a329-7dfc-869e-2e429d4987dd@insa-toulouse.fr>

Le 04/12/2018 ? 19:12, Martin Maechler a ?crit?:
>>>>>> Serguei Sokol
>>>>>>      on Tue, 4 Dec 2018 11:46:32 +0100 writes:
>      > Le 04/12/2018 ? 11:27, I?aki Ucar a ?crit?:
>      >> On Tue, 4 Dec 2018 at 11:12, <qweytr1 at mail.ustc.edu.cn> wrote:
>      >>> function ppois is a function calculate the CDF of Poisson distribution, it should generate a non-decreasing result, but what I got is:
>      >>>
>      >>>> any(diff(ppois(0:19,lambda=0.9))<0)
>      >>> [1] TRUE
> ...
>      > any(diff(exp(ppois(0:19, lambda=0.9, log.p=TRUE))) < 0)
>      > #[1] FALSE
>
>      > But may be there is another, more economic way?
>
> Well, log probabilites *are* very economic for many such p*()
> functions.
I have not doubt about it. My "economic way" was related to get ppois() 
*non decreasing*, at least, more economic than exp-log.p trick.

Serguei.



[Rd] Bug report: Function ppois(0:20, lambda=0.9) does not generate a non-decreasing result.
Serguei Sokol