Re: [R] R2WinBUGS results not different with different runs

2007-08-08 Thread toby909
Gregor Gorjanc wrote:
  toby909 at gmail.com writes:
 
Is this a specialty with R2WinBUGS? Does it have something to do with the 
seed 
value? Isnt the seed value reset everytime I restart winbugs?
 
 
 I always have the same seed if I start WinBUGS multiple times.

So you get exactly the same chain, numerically, when rerunning the same model, 
with the same number of iterations, everything the same.?

Wouldnt that be problematic if every researcher in the world who uses winbugs 
uses the same sequence of random numbers?

R's random numbers are different each time, because the seed is linked to the 
clock in your PC.

T

 
 Gregor
 
 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.


__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R2WinBUGS results not different with different runs

2007-08-08 Thread Gregor Gorjanc
 toby909 at gmail.com writes:
 
 Gregor Gorjanc wrote:
   toby909 at gmail.com writes:
  
 Is this a specialty with R2WinBUGS? Does it have something to do with the 
 seed value? Isnt the seed value reset everytime I restart winbugs?
  
  I always have the same seed if I start WinBUGS multiple times.
 
 So you get exactly the same chain, numerically, when rerunning the same 
  model, with the same number of iterations, everything the same.?

I just tried now with Gelman's schools example from bugs() help page. I runned
the same job twice, with exactly the same initial values. Notes that WinBUGS
uses always the same starting seed. I got this

 schools.sim$last.values
[[1]]
[[1]]$theta
[1] 23.700 10.060 12.760 13.090  1.693 14.390  7.599  3.961

[[1]]$mu.theta
[1] 25.03

[[1]]$sigma.theta
[1] 20.08



 schools.sim2$last.values
[[1]]
[[1]]$theta
[1] 23.700 10.060 12.760 13.090  1.693 14.390  7.599  3.961

[[1]]$mu.theta
[1] 25.03

[[1]]$sigma.theta
[1] 20.08

 Wouldnt that be problematic if every researcher in the world who uses winbugs 
 uses the same sequence of random numbers?
 
 R's random numbers are different each time, because the seed is linked to the 
 clock in your PC.

You can reset the seed if you want. Having the same seed is also nice for 
repeatability.

Gregor

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] R2WinBUGS results not different with different runs

2007-08-07 Thread Gregor Gorjanc
 toby909 at gmail.com writes:
 Is this a specialty with R2WinBUGS? Does it have something to do with the 
 seed 
 value? Isnt the seed value reset everytime I restart winbugs?

I always have the same seed if I start WinBUGS multiple times.

Gregor

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.