Welcome to the LimeSurvey Community Forum

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

How to split responders into two groups?

  • tuniali6
  • tuniali6's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 8 months ago #134264 by tuniali6
Hi,

I have a question concerning an equal (or almost) assignment to two groups. My survey has 5 different groups of question. Groups number 1,3,4 and 5 are exactly the same for everyone. But in the second group I want to split participants into two groups. The half will answer one question, the other one a different question.
How can I do that?

Thanks!
The topic has been locked.
More
8 years 8 months ago #134265 by jelo
The topic has been locked.
  • tuniali6
  • tuniali6's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 8 months ago #134268 by tuniali6
Replied by tuniali6 on topic How to split responders into two groups?
Thank you for your response. I'm not really sure whether this is what I was looking for.
I want (after the first group of questions) to split respondents into two paths, like giving them number '1' or '2'. Then those with '1' will answer questions 1,2,3 in the second group of questions, and those with '2' will answer questions 4,5,6.
I suppose that I should do something with this formula: {SAVEDID-(floor(SAVEDID/2)*2)+1}
but I am not sure how to use it...
The following user(s) said Thank You: nannancy
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 8 months ago #134269 by holch
Replied by holch on topic How to split responders into two groups?
Well, what you need to do is to create a random number via Expression manager and write it into a equation that you will hide.

So if you have 2 groups of people you need to create a random number between 1 and 2.
Code:
{floor(rand(1,2))}

This should give you either 1 or 2. For testing purposes you can show the question and only hide it later.

Then for each question you would create a relevance equation of something like:
Code:
random=="1"
if the question should be shown for group 1. Similar for group 2.

www.limesurvey.org/manual/Expression_Man...e_Question_Per_Group

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.
  • tuniali6
  • tuniali6's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 8 months ago - 8 years 8 months ago #134273 by tuniali6
Replied by tuniali6 on topic How to split responders into two groups?
Ok, I think that this is what I need. I am still not sure how to make the first step ( step 2: the relevance equation- I know how to do this).
Could you please describe me the firs step? Should I create a group of question after the first group with just one question with the sentence: {floor(rand(1,2))}? And where exactly shoul I put that: {floor(rand(1,2))}?

Thank you once again!
Last edit: 8 years 8 months ago by tuniali6.
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 8 months ago - 8 years 8 months ago #134276 by holch
Replied by holch on topic How to split responders into two groups?
You would create a equation question and in this equation question you would create the random number. I wanted to attach an example, but unfortunately it is not working well yet. Probably because my questions are on the same page and I remember that this can cause a few problems.

Problem is that the random number seems to be triggered by various events, which can be a problem when the random question and the other questions are on one page. Not sure why this is exactly, but maybe some expert like Tpartner or Denis can give a good explanation.

I think it is solved in the sample attached.

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

Last edit: 8 years 8 months ago by holch.
The topic has been locked.
More
8 years 8 months ago #134287 by coeneisma
Replied by coeneisma on topic How to split responders into two groups?
You could also check if the <code>SAVEDID</code> is even or uneven or the modulus of it, and make questiongroups appear depending the result.

Example:
<code>{if(floor(SAVEDID/2)==(SAVEDID/2),0,1)}</code>
The following user(s) said Thank You: nannancy
The topic has been locked.
More
8 years 8 months ago #134329 by jelo
Replied by jelo on topic How to split responders into two groups?

tuniali6 wrote: The half will answer one question, the other one a different question.

My suggestion via relevanceStatus and Randomizationgroup was based on your statement above. One question per half. Since that is no longer the case relevance Status won't work.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
More
8 years 8 months ago #134330 by jelo
Replied by jelo on topic How to split responders into two groups?

holch wrote: Problem is that the random number seems to be triggered by various events, which can be a problem when the random question and the other questions are on one page.

Think about when allowing going back and forth in the survey as well. Can be very confusing when respondent are getting new random numbers and have to fill out different questions.

Rule of thumb: Create every random number you need at the beginning of the survey.

The discussion about "instant" change of random values goes years back.
www.limesurvey.org/forum/design-issues/9...atory-simultaneously
I hope in LS 3.0 the concepts behind different functions get aligned.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
  • tuniali6
  • tuniali6's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 8 months ago #134341 by tuniali6
Replied by tuniali6 on topic How to split responders into two groups?
Guys,

thank you so much for your help. I managed with SAVEDID (I hope ;)).
As for now I can not test it, because the survey is not active. Could you then tell me whether this is the right formula for creating 4 random numbers (1,2,3 and 4)? I am not sure if this is for 2 numbers or for 4.

Thank you! :)
The topic has been locked.
More
8 years 8 months ago #134343 by jelo
Replied by jelo on topic How to split responders into two groups?

tuniali6 wrote: I am not sure if this is for 2 numbers or for 4.

Since you asked for two groups of respondents, it's for two numbers.

holch offered a random number generator, which can be changed to four by changing {floor(rand(1,2))} into {floor(rand(1,4))}.

coeneisma offered a solution based on the saveid, which turn even and uneven with every iteration. Two states (even, uneven). Not four states.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose