Welcome to the LimeSurvey Community Forum

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

How to randomize 2 groups of Qs so that at one time only 1 group is displayed?

  • u0125497
  • u0125497's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 month 1 week ago - 1 month 1 week ago #259905 by u0125497
Hello,
I am currently creating my first survey in LimeSurvey, and I have one problem.

My survey has 4 groups of questions: 1st and 4th group will be standard & displayed to all participants, while 2nd and 3rd group should be randomized in a way that some participants should see only 2nd group of questions (without 3rd group of questions), and the other random participants should have displayed only 3rd group of questions (without 2nd). 

Is it possible to arrange it in LimeSurvey? I tried via "Randomization group", but it only changes that group 2nd and 3rd are both displayed in a random order, while I wish to have randomly displayed either group 2nd either group 3rd.

Thank you in advance for any suggestions!
Last edit: 1 month 1 week ago by u0125497.

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 month 1 week ago #259907 by Joffm

I tried via "Randomization group"

Yes, this is the wrong approach.
You use "randomization group " to display ALL questions/groups in randomized order.
You have to use a random number. (1-2) to display ONE randomly selected question/group out of n.

So, create a random number in a question of type "equation"
Like {if(is_empty(randnbr),rand(1,2),randnbr)}
and set the condition of your groups.
Either randnbr==1
or randnbr==2

Joffm

 

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

  • u0125497
  • u0125497's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 month 1 week ago #260039 by u0125497
Hello Joffm,

Thanks a lot for your reply!

So, if I understand well:
1. For each question of the 2 groups, I need to set each question type as "equation".
2. As condition set this: {if(is_empty(randnbr),rand(1,2),randnbr)}
3. In "Equation" set  randnbr==1 or randnbr==2

Is that correct? I just tried and unfortunately nothing has changed, still both groups of questions are displayed.

Any advice? Big thanks in advance!

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 month 1 week ago - 1 month 1 week ago #260049 by Joffm

So, create a random number in a question of type "equation"
Like {if(is_empty(randnbr),rand(1,2),randnbr)}

Of course the question code has to be "randnbr".
Now your variable "randnbr" will be either equal 1 or equal 2.

and set the condition of your groups.
Either randnbr==1
or randnbr==2

What is a condition?
A condition os a logical term that can be TRUE or FALSE.
If TRUE the group / question / subquestion is displayed, if FALSE not.

Now if you set the condition of group 1 to "randnbr==1" this group is only displayed if "randnbr" has the value "1"

Joffm

 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 1 month 1 week ago by Joffm.

Please Log in to join the conversation.

Lime-years ahead

Online-surveys for every purse and purpose