Welcome to the LimeSurvey Community Forum

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

Randomized selection of questions's pairs among 2 groups

  • NicolasEzratty
  • NicolasEzratty's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 2 weeks ago #214377 by NicolasEzratty
Hi,
I'm designing a survey that need to assign a pair of questions to the participants, exept the questions needs to be taken from 2 different groups, so that the pair can be questions from each one of the conditions.
I have 2 groups of 6 questions for that, and I would like to only ask each participant a pair of questions and hiding/not asking the others.

Thank you in advance, I'm struggling with that for some time now and it seems I don"t manage to do it on my own.
 
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 2 weeks ago #214381 by Joffm
Hi,
so you will have to create a question of type "equation" (let's call it "randnumber") where you generate a random number (1-6)
E.g. {if(is_empty(randnumber),rand(1,6),randnumber)}

Then you display your pair of questions by entering the relevance equation
pair 1, question 1: randnumber==1
pair 1, question 2: randnumber==1
pair 2, question 1: randnumber==2
pair 2, question 2: randnumber==2
pair 3, question 1: randnumber==3
...

Joffm
 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: NicolasEzratty
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 2 weeks ago #214382 by holch
In my point of view there are two options (if I understood correctly what you want to do). As far as I understood, the "pair" just means that you need two questions (1 from each group) and it could be ANY question from each group (e.g. A3/B6, A5/B1, etc.). If you need questions from the groups that match in some way, e.g. A1/B1, A2/B2, etc. this would be different.

First solution:

Create two questions groups for each "group". Put one question in the first group and the other 5 in the second group. Give all of these 6 questions that are distributed over these 2 question groups the same "randomization group name", then hide the second of the questions groups with the 5 questions in it.

What will happen? The 6 questions will rotate randomly among the 6 positions over the 2 questions groups. As the second question group is hidden, only one of the questions will appear randomly.

Do the same for your second group of questions.

Second solution:
You create 2 equation type questions and create a random number in each of them.
Code:
{if(is_empty(rand1),rand(1,6),rand1)}

With "rand1" being the question code of the first equation question. You then need to do the same for the other equation question let's say "rand2".

Then you will show/hide the questions within each of the groups via relevance equation, with something like this:
Code:
rand1==1

If you place this in the relevance equation of a question, this question will only be shown if the random number we created in the equation question "rand1" is equal to 1.

Adapt accordingly for the others.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The following user(s) said Thank You: NicolasEzratty
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 2 weeks ago #214383 by holch
OK, Joffm beat me to it and he understood your 'pairs' as actual pairs, so one question always needs to be together with a specific question from the other group.

Now it is up to you to tell us, which one it is. ;-)

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • NicolasEzratty
  • NicolasEzratty's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 2 weeks ago #214387 by NicolasEzratty
Thank you so much for these quick answers !
I will now try to understand and apply them to my study !
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 2 weeks ago #214388 by Joffm
Hi,
reading it again, I am not sure anymore that I understood correctly.
Now I am more inclined to holch's understanding of the question.

Anyway, you've got three solutions.
I think one of them will fulfill you requirements.

Or, explain more detailled.

Joffm

 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 2 weeks ago #214392 by holch
Same here Joffm. Would be curious which is what he actually wants.

I think both our interpretations are possible. The word "pair" would more direct towards your solution, with real pairs, but somehow I have a feeling that we are not talking about "pairs" in the real sense of the word, but just 2 questions.

Only OP will know. ;-)

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • NicolasEzratty
  • NicolasEzratty's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 2 weeks ago - 3 years 2 weeks ago #214423 by NicolasEzratty
Hi, first thanks again for everything.I think that the word pair might have mislead you just a bit.

I actually need one question of each group to be randomized and shown one after the other one the participants. But still 2 questions out of the 12.

I'm trying Holch first suggestion at the moment and I'd like to know, when you say hide the 5 questions in the second group, is it the "Always hide button" in the display section ?

I did this and when I preview the survey, it gives me a randomized group but always the same first question that belongs to the first group.I gave the same randomization name to each of the 6 questions. It looks like this.

Thanks in advance !  
Attachments:
Last edit: 3 years 2 weeks ago by NicolasEzratty.
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 2 weeks ago #214428 by Joffm

Give all of these 6 questions that are distributed over these 2 question groups the same "randomization group name", then hide the second of the questions groups with the 5 questions in it.

1. You were told to have the same randomization group name fpr ALL 6 questions. Now the first has name "rand1" the others "rand2"
Therefore this first question is NOT randomized with the other five. And so it is show.

2. No, you hide the group by setting the relevance equation to 0 on group level. "Edit group".

Joffm

 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 2 weeks ago #214435 by holch
As Joffm says: For each question within your "logical groups" you need to give them all the same "randomization group name":

So RQ1 to RQ6 need to have all for example "randgroup1" as randomization group name. What this does is randomize these questions among all positions of questions that have this same randomization group name. This is very flexible, because these questions could be positioned anywhere in the questionaire and still be randomized.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • NicolasEzratty
  • NicolasEzratty's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 2 weeks ago #214486 by NicolasEzratty
It works just as intented ! Thank you very much for everything !
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose