Welcome, Guest
Username: Password: Remember me

TOPIC: Randomize experimental treatment

Randomize experimental treatment 8 months 2 weeks ago #102612

  • frankala
  • frankala's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 1
  • Karma: 0
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
The administrator has disabled public write access.

Randomize experimental treatment 8 months 2 weeks ago #102618

  • tpartner
  • tpartner's Avatar
  • NOW ONLINE
  • LimeSurvey Team
  • Posts: 4139
  • Thank you received: 767
  • Karma: 349
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.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.169 seconds
Donation Image