reported ?RNG bug

Thomas Lumley
Mon, 9 Nov 1998 09:16:27 -0800 (PST)

On Mon, 9 Nov 1998, Mai Zhou wrote:

> RNG in R and Splus 3.4
> Prof. Ripley asked the details of the example. 
> We were doing parametric bootstrap, so it is similar to simulation.
> Anyway here is the details.

The following code replicates this without needing any specific
hand-coding of numbers each time it is run (except for the slight chance
that y2 will be shorter than 1900 elements)

  x1 <- rexp(100, rate=0.3)
  x2 <- x1[x1<theta] 
  x3 <- x2[1:19]
  y1<-rexp(4000, rate=0.3)
  y2<-y1[y1< max(x3)]
  y4 <- matrix(y3, ncol=19, byrow=T)
  maxboot <- apply(y4, 1, max)
  biasboot <- mean(maxboot) - max(x3)  

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 Lumley
Assistant Professor, Biostatistics
University of Washington, Seattle.

r-devel mailing list -- Read
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: