[R] Re: reported ?RNG bug

Thomas Lumley thomas at biostat.washington.edu
Mon Nov 9 20:03:03 CET 1998


On Mon, 9 Nov 1998, Mai Zhou wrote:

> Thomas, Interesting, can you try the following too?
> 
> b <- function(x, nboot, theta) {
> 
>      y1<-rexp(2*length(x)*nboot, rate=0.3)
>      y2<-y1[y1<theta]
>      y3<-y2[1:(length(x)*nboot)]
>      y4<- matrix(y3, ncol=length(x), byrow=T)
>      mean(apply(y4, 1, max))- theta
> }

Guido's R0.61.3 NT
> b(rep(1,19), 1500, 4)
[1] -0.3393658
> 
> b(rep(1,19), 1500, 4)
[1] -0.3589177
> 
> b(rep(1,19), 1500, 4)
[1] -0.3605262
> 
> b(rep(1,19), 1500, 4)
[1] -0.3405436

R pre0.62 Solaris
> b(rep(1,19), 1500, 4)
[1] -0.3519112
> b(rep(1,19), 1500, 4)
[1] -0.3406813
> b(rep(1,19), 1500, 4)
[1] -0.3483771
> b(rep(1,19), 1500, 4)
[1] -0.3420376
> b(rep(1,19), 1500, 4)
[1] -0.3405135

R0.61.3 Linux
>  b(rep(1,19), 1500, 4)
[1] -0.3545278
>  b(rep(1,19), 1500, 4)
[1] -0.3509693
>  b(rep(1,19), 1500, 4)
[1] -0.3399184
>  b(rep(1,19), 1500, 4)
[1] -0.3470082

S-PLUS 3.4 Solaris
> b(rep(1,19), 1500, 4)
[1] -0.341239
> b(rep(1,19), 1500, 4)
[1] -0.3518242
> b(rep(1,19), 1500, 4)
[1] -0.3369862
> b(rep(1,19), 1500, 4)
[1] -0.3521082



It seems that the problem is in RJune (or somewhere in your installation).
We really need someone else to try this on RJune.

	-thomas

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