I need to randomise participants to two groups which we can call 'A' and 'B'. As a further complication, I need to use 'block randomisation'. If you use blocks of four for example, they are 6 different patterns possible:
AABB, BBAA, ABAB etc etc.
If you then generate a random number between 1 and 6 and the result is '2', this simply means you will use the second block above (BBAA). From then you can a number of things. You can allocate the next four participants into this block for example. Participant 1 goes into group B, the next into group B and so on.
But the actual methodology here isn't the issue.
The problem I'm having is that the randomisation should be reproducible. This means that if the randomisation were to be repeated, the same people have to be randomised into the same groups.
Generating a random between 1 and 6 number is OK:
Randomize
RandVal = Int((6 * Rnd) + 1)
The difficulty I'm having is to produce the exact same sequence of random numbers. I understand that what I need to do is ensure that the same initial seed value is being used when randomising. I have tried the following with no luck (the sequence on numbers I'm generating is not always the same):
Randomize
RandVal = Int((6 - 1 + 1) * Rnd + 1)
Can anyone tell me what the exact syntax should be to achieve the desired result?
Thanks very much,
Mo
AABB, BBAA, ABAB etc etc.
If you then generate a random number between 1 and 6 and the result is '2', this simply means you will use the second block above (BBAA). From then you can a number of things. You can allocate the next four participants into this block for example. Participant 1 goes into group B, the next into group B and so on.
But the actual methodology here isn't the issue.
The problem I'm having is that the randomisation should be reproducible. This means that if the randomisation were to be repeated, the same people have to be randomised into the same groups.
Generating a random between 1 and 6 number is OK:
Randomize
RandVal = Int((6 * Rnd) + 1)
The difficulty I'm having is to produce the exact same sequence of random numbers. I understand that what I need to do is ensure that the same initial seed value is being used when randomising. I have tried the following with no luck (the sequence on numbers I'm generating is not always the same):
Randomize
RandVal = Int((6 - 1 + 1) * Rnd + 1)
Can anyone tell me what the exact syntax should be to achieve the desired result?
Thanks very much,
Mo