[R] Poisson distribution help requested

Peter Dalgaard p.dalgaard at biostat.ku.dk
Fri Jan 9 18:03:09 CET 2004


Martin Maechler <maechler at stat.math.ethz.ch> writes:

> >>>>> "Spencer" == Spencer Graves <spencer.graves at pdf.com>
> >>>>>     on Fri, 09 Jan 2004 07:32:09 -0800 writes:
> 
>     >> ppois(0:11, 2)
>     Spencer>  [1] 0.1353353 0.4060058 0.6766764 0.8571235
>     Spencer> 0.9473470 0.9834364 0.9954662 [8] 0.9989033
>     Spencer> 0.9997626 0.9999535 0.9999917 0.9999986
> 
>     Spencer> This is the cumulative distribution function of the
>     Spencer> Poisson with mean 2 at the values 0 - 11.
> 
>     Spencer> hope this helps.  spencer graves
> 
> and from Mark's "level of significance (alpha)",
> I presume Mark really wants  qpois()  which computes quantiles,
> i.e., the *inverse* of ppois().

But SAS doesn't seem to do Poisson quantiles....

However,

data;
input x;
y = poisson(1,x);
datalines;
0
1
2
3
4
;
proc print;
run;

Produces

 Obs    x       y

  1     0    0.36788
  2     1    0.73576
  3     2    0.91970
  4     3    0.98101
  5     4    0.99634

which is similar to

> ppois(0:4,1)
[1] 0.3678794 0.7357589 0.9196986 0.9810118 0.9963402


-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907




More information about the R-help mailing list