[R] rexp and rweibull

Mai Zhou mai at ms.uky.edu
Mon Aug 30 06:26:08 CEST 1999


In splus rexp() and rweibull() are related:

> set.seed(153)
> rexp(1)
[1] 0.0493267
> set.seed(153)
> rweibull(1, shape=1)
[1] 0.0493267

(you can also try shape =2, then rweibull = sqrt(rexp) )
However, in rw0.64.1 (on Win NT) they are different 

> .Random.seed <- 1:4
> rexp(1)
[1] 1.412030
> .Random.seed <- 1:4
> rweibull(1, shape=1)
[1] 2.054032 

May be rweibull should be built on rexp.

Mai Z
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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