Hi,

I understand that I can set two different seeds for rand() by specifying 
two random number generators in the following way:

-------------------------------------------
first_rng = MersenneTwister()
second_rng = MersenneTwister()

srand(first_rng,1);
srand(second_rng,2);

x_vol = rand(first_rng,1)
x_z = rand(second_rng,1)
-------------------------------------------

Now I would like to sample with replacement given certain weights so I have 
been using the sample() function from StatsBase. However, I would like to 
set a *separate* seed for this. Is there a way to pass a specific RNG to 
sample() in the way it is done for rand()?

As always, thanks for your help,

Benjamin

Reply via email to