Pseudo randomisation

M

Mo

Hello All,

I need to randomise participants to two groups which we can call 'A' and
'B'. Also, because of certain design requirements, I also need to
randomise in blocks of 4 (i.e. 1.AABB, 2.BBAA, 3.ABAB, 4.BABA, 5.ABBA,
6.BAAB. This ensures that even for small numbers, the two groups should
get (approximately) the same number of people).

This is quite manageable so far by having a lookup table of these block
patterns in the db and then generating a random number between 1 and 6 using

Randomize
RandVal = Int((6 * Rnd) + 1)

The number generated (e.g. 4, then refers to block 4 - BABA and so on).
From then on it's simply a matter of having a sequence number in the
block table telling me which character was last used. So if the sequence
number is 2, the next person will go into group 'B', the third character
in the sequence.

This all works with little trouble.

However, I now need to make the randomisation reproduceable so that if
the same people were to be re-randomised (for example, during an audit),
the results would be the same. In other words, everyone would be
randomised to the same group as before.

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:

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top