From qweytr1 m@ili@g off m@il@ustc@edu@c@  Mon Dec  3 15:06:48 2018
From: qweytr1 m@ili@g off m@il@ustc@edu@c@ (qweytr1 m@ili@g off m@il@ustc@edu@c@)
Date: Mon, 3 Dec 2018 22:06:48 +0800 (GMT+08:00)
Subject: [Rd] Bug report: Function ppois(0:20,
 lambda=0.9) does not generate a non-decreasing result.
Message-ID: <f49f51f.a07fd.16774649817.Coremail.qweytr1@mail.ustc.edu.cn>

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


Actually,



> ppois(19,lambda=0.9)<ppois(18,lambda=0.9)
[1] TRUE



Which could not be TRUE.


Code is tested in both R 3.5.1 and Microsoft R Open 3.5.1.


               _                          
platform       x86_64-w64-mingw32         
arch           x86_64                     
os             mingw32                    
system         x86_64, mingw32            
status                                    
major          3                          
minor          5.1                        
year           2018                       
month          07                         
day            02                         
svn rev        74947                      
language       R                          
version.string R version 3.5.1 (2018-07-02)
nickname       Feather Spray      







PS. if set lambda=1, such bug will not appear.








	[[alternative HTML version deleted]]



[Rd] Bug report: Function ppois(0:20, lambda=0.9) does not generate a non-decreasing result.
qweytr1 m@ili@g off m@il@ustc@edu@c@