Randomize experimental treatment

More
3 years 11 months ago #102612 by frankala
frankala created the topic: Randomize experimental treatment
Hi everybody, we are currently setting up a questionaire for our online experiment and have problems randomizing the treatment in the beginning. Can anybody help us out? Would be great!
We created an equation question (in an own question group) with {rand(1,5). In the following we created five question groups which contain our five different treatments. Here we picked for relevance: ((randnumber == "X")) (X=1-5).
But still, the preview shows all of the treatments. Does that mean it doesn't work? Or is it just not possible to see it in the preview?

Thanks a lot in advance! Best, Franka

Please Log in to join the conversation.

More
3 years 11 months ago #102618 by tpartner
tpartner replied the topic: Randomize experimental treatment
Yeah, that should work in preview.

Try this for the equation in the "randnumber" question. It will ensure that the random number is only generated once.
{if(randnumber >= 0, randnumber, rand(1,5))}

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!