[R] problems with rexp ?
Ole Christensen
o.christensen at lancaster.ac.uk
Fri May 3 15:55:20 CEST 2002
Hi Juan
It looks constant to me. Note the range of the values on the second axis
!!!
Sometimes you even get a warning about this
Warning message:
relative range of values = 22.5 * EPS, is small (axis 2).
Note also: By calling your variable ``data'' you are over-writting a
function of the same name
(I do not think it did any harm in your example).
Cheers Ole
Juan Ramon Gonzalez wrote:
>
> Does anyone know if R have any problems with the exponential random number
> generation (function rexp)?
>
> I comment it because I executed
>
> data<-sort(rexp(100))
> plot(data,dexp(data)/(1-pexp(data)),type="l")
>
> and the graphic isn't constant.
>
> (Note: exponential distribution have a constant hazard failure rate).
>
> Thank you,
>
> Juan
>
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> r-help 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-help-request at stat.math.ethz.ch
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
--
Ole F. Christensen
Department of Mathematics and Statistics
Fylde College, Lancaster University
Lancaster, LA1 4YF, England
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help 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-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list