[R] Help with pexp( )

Douglas Bates bates at stat.wisc.edu
Wed Apr 11 21:14:17 CEST 2007


On 4/11/07, Jeann S <jeann_123 at hotmail.com> wrote:
> Dear all,
>
> Sorry for bringing up an old issue:
>
>     >pexp(50, 0.5)
>     [1] 1
>
> In some cases, pexp()  gives CDF=1. I read some discussion in 2002 saying it
> has been patched. However it's not working in "R2.4.1Patched". Could anyone
> help me out?

And why is this a problem?  The cdf of an exponential distribution
with rate = 0.5 evaluated at x = 50 is very close to 1.  If you want
to find out exactly how close you could use

pexp(50, rate = 0.5, lower.tail = FALSE)

which gives an answer on the order of 10^(-11).



More information about the R-help mailing list