[R] Re: reported ?RNG bug
Mai Zhou
mai at ms.uky.edu
Mon Nov 9 19:55:27 CET 1998
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
}
I got arround -0.155 on Rjune.
Where x is a length 19 vector, theta=4
One typical run is
> b(rep(1,19), 1500, 4)
[1] -0.1585402
While on Splus I got
> b(rep(1,19), 1500, 4)
[1] -0.3516429
Mai Z
>
> I ran this 1000 times on S-PLUS 3.4 for Solaris, Rpre0.63 for Solaris,
> Guido's R 0.61.3 for Windows (NT) and R0.61.3 for Linux (the oldest R I
> have lying around) and got
>
> S-PLUS -0.3040023
> Rpre0.63 -0.3083820
> R 0.61.3 -0.3054932
> WinNT -0.307758
>
> I don't have easy access to RJune, but it seems that on the other current
> and recent Rs the example works consistently.
>
> Anyone else tried this on RJune?
>
> -thomas
>
>
> Thomas Lumley
> Assistant Professor, Biostatistics
> University of Washington, Seattle.
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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