search for: startingrng

Displaying 1 result from an estimated 1 matches for "startingrng".

Did you mean: startingin
2005 Jun 08
1
FW: Random seed problem in MCMC coupling of chains
...required. In your example it is important that you generate the same number of random numbers in each pass through the chain. If that is not the case then even with the setRNG utilities there is a subtle change that you are introducing. HTH, Paul > > niter <- 3 > nchain <- 2 startingRNG <- setRNG() > for (i in 1:niter) { # iterations > tmpSeed <- setRNG() > for (j in 1:nchain) { # chains > setRNG(tmpSeed) > a <- runif(1) > cat("iter:", i, "chain:", j, "runif:", a, "\n") > } > } > > it...