0

How can I control over sampling in sequential Gaussian simulation?

For example in the following code, how can I guarantee that the Monte Carlo samples are not duplicitous?

library(sp)
library(gstat)

data(meuse)
coordinates(meuse) = ~x+y
data(meuse.grid)
gridded(meuse.grid) = ~x+y
m <- vgm(.59, "Sph", 874, .04)
# ordinary kriging:
x <- krige(zinc~1, meuse, meuse.grid, model = m, nsim=10, debug.level=-1)

I know that the default setting in sample function, is "replace = FALSE" and not to replace the generated samples. Is SGS the same?

Mohammad
  • 67
  • 1
  • 9
  • Is the last line of your code supposed to run for minutes? – LAP Feb 05 '18 at 08:23
  • It is running for about five minutes on my machine, still not done. – LAP Feb 05 '18 at 08:26
  • Please run in the debug mode to see the progress. I edited the code. – Mohammad Feb 05 '18 at 08:35
  • Sorry @LAP I ran it again and faced a significant runtime. I'm sure that I could run this case for less than a minute. But now! I'm really confused! – Mohammad Feb 05 '18 at 08:50
  • Well, It's been running for nearly 20 Minutes and I've made it to 69% progress. And my machine is not too shabby :) As general advice, the probability of drawing the exact same full sequence from a sample of 155 observations is theoretically zero. – LAP Feb 05 '18 at 09:04
  • see https://stackoverflow.com/questions/48520861/kriging-simulation-using-ff-package/48563536?noredirect=1#comment84192427_48563536 – Edzer Pebesma Feb 06 '18 at 05:17
  • Possible duplicate of [Kriging simulation using ff package](https://stackoverflow.com/questions/48520861/kriging-simulation-using-ff-package) – Edzer Pebesma Feb 06 '18 at 05:18

0 Answers0