Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Allocation to one of two survey versions

  • hughesm
  • hughesm's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 4 months ago #217571 by hughesm
Good evening and greetings from Tasmania,

I would like to know if it is possible for participants to be automatically (alternately) allocated to one of two versions of a survey, please? Where each version is part of one LimeSurvey file. Both surveys are identical except for the order of answer options. I would like each survey to have a randomised order of presentation of question groups (using the randgroup descriptor). I was thinking perhaps I could do something like this:

1= welcome message, information & demographics AND {question groups 1 through 10, all randgroup1} AND end message etc OR  2= welcome message, information & demographics AND {question groups 11 through 20, all randgroup2} AND end message, with 1 and 2 alternating (automatic).

Please excuse the rudimentary attempt at (pseudo)syntax above, hope it gets my message across!

Many thanks,

Michelle (psychology student)
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 4 months ago #217573 by tpartner
Replied by tpartner on topic Allocation to one of two survey versions
You cannot have "1 and 2 alternating (automatic)" but you can load a hidden equation question (let's call it random1) with a random number between 1 and 2 and then set relevance on the following groups based on the random number. This will not give an exact 50/50 split but it will be close if you have a large enough response pool. The exact 50/50 split is almost impossible to achieve as there will be drop-outs, concurrent responses. etc.

Code:
{if(is_empty(random1), rand(1,2), random1)}

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • hughesm
  • hughesm's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 4 months ago #217574 by hughesm
Replied by hughesm on topic Allocation to one of two survey versions
Hi Tony,

Many thanks for your speedy reply. Do I need access to Configuration to implement this? Where would I type this directive?

Thanks again,

Michelle
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 4 months ago #217575 by tpartner
Replied by tpartner on topic Allocation to one of two survey versions
1) Add an equation question in the first group with question-code random1.

2) Assign it a CSS class "hidden".

3) Place the equation I provided in that question text.

4) Set the group relevance for your following groups as either
Code:
random1 == 1
or
Code:
random1 == 2

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • hughesm
  • hughesm's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 4 months ago #217576 by hughesm
Replied by hughesm on topic Allocation to one of two survey versions
Hi again Tony,

Thank you so very much! Very kind.

Have a great evening,

Michelle
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose