Welcome to the LimeSurvey Community Forum

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

Failing to randomly select questions in groups

  • mathieulorenzo
  • mathieulorenzo's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
10 months 5 days ago #244443 by mathieulorenzo
Failing to randomly select questions in groups was created by mathieulorenzo
Please help us help you and fill where relevant:
Your LimeSurvey version: [see right hand bottom of your LimeSurvey admin screen]
Own server or LimeSurvey hosting:
Survey theme/template:
==================
(Write here your question/remark)Please help us help you and fill where relevant:
Your LimeSurvey version: Version 5.6.25
Own server or LimeSurvey hosting: Limesurvey hosting
Survey theme/template: fruity
==================
Hello,

This is my first post here. I could'nt find the anwer to my problem in the forum...

I have created a 13 groups survey. In each group, I want to randomly select one of ten question. I used one of the solutions I found in the forum : the relevance status equation. The equation for one question (code S2) is : sum(S1.relevanceStatus, S3.relevanceStatus, S4.relevanceStatus, S5.relevanceStatus, S6.relevanceStatus, S7.relevanceStatus, S8.relevanceStatus, S9.relevanceStatus, S10.relevanceStatus) LT 1

For each group, I assigned a random groupe name (e.g G1 for the first group).

It works perfectly fine if I create only one group in my survey. The problem is when I create a survey with two or more groups : the selection fails. An page with no questions is displaying if I test the survey then.
I cannot find what is the problem with my survey... It took me a looong time to set 356 questions in 36 groups...

Is there anyone here that could help me solving this issue ?

You will find my .lss file attached.

Thank you !

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
10 months 4 days ago #244457 by Joffm
Hi,
do you want to display the groups on randomized order?
You wrote

For each group, I assigned a random groupe name (e.g G1 for the first group).

The randomization group name in group level is to randomize groups.
Do you want to display the groups on randomized order?
Then ALL groups have to get the same "randomozation group name"

And as you do not display the questions inside one group in random order, but only show one single question, the randomization group name in question level is obsolete.

And now two simple solutions without these long equations using "relevanceStatus"
1. At the beginning create 13 random numbers (1-10)
In each group display the respective question by condition,

2. Use the approach to split each group into two (one containing 1 question, the other the remaining 9). The second group is hidden.
All questions in these two groups get the same "randomozation group name".
Therefore all 10 question are shuffled among these two groups, but only one (in the visible group) is displayed.


According to the design:
You also could have used an question of type array with your 10 questions as subquestions, and only display one subquestion by subquestion relevance (again using a random number)

Later I will show short examples.

Joffm



 

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

Please Log in to join the conversation.

  • mathieulorenzo
  • mathieulorenzo's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
10 months 4 days ago #244461 by mathieulorenzo
Replied by mathieulorenzo on topic Failing to randomly select questions in groups
Thank you Joffm for your answer.

It's optionnal for me to display groups in randomised order.

I assigned a random group name for each question according to these instructions (numer 11) : manual.limesurvey.org/Expression_Manager...e_Question_Per_Group

It says :"This survey shows how to ask a random subset of questions in a group. For example, show 5 random questions out of 10 questions located within a group.The survey has one group containing 10 questions. All questions are assigned the same randomization group name . As a result, they will be displayed in a random order on page load. Each question is given a relevance equation that the sum of the " relevanceStatus " of all other questions in the group is less than the number of questions you want to show. Since relevanceStatus is assigned as questions are rendered, this effectively totals the number of preceding questions.So, in our 5 out of 10 example, the equation for Q1 would be:sum(Q2.relevanceStatus, Q3.relevanceStatus, Q4.relevanceStatus, Q5.relevanceStatus, Q6.relevanceStatus, Q7.relevanceStatus, Q8.relevanceStatus, Q9.relevanceStatus, Q10.relevanceStatus) LT 5
For Q2, it would be:sum(Q1.relevanceStatus, Q3.relevanceStatus, Q4.relevanceStatus, Q5.relevanceStatus, Q6.relevanceStatus, Q7.relevanceStatus, Q8.relevanceStatus, Q9.relevanceStatus, Q10.relevanceStatus) LT 5
And so on..." I would love to avoid re-doing all my 356 equations...
Is there a way to make my survey work with this method or do I have to switch for one of the methods Joffm suggested ?

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
10 months 4 days ago #244462 by Joffm
And the shortest solution is

You put only one question into each group and "taylor" the question text according to the random number, like
{if(rand1==1,"text of question1",if(rand1==2,"text of question2",if(rand1==3,"text of question3",if...)))}
especially because the question text only differs in a few words.

So this

It took me a looong time to set 356 questions in 36 groups...

would not have happened if you'd created a small prototype with three groups and 4 questions, or so, where you tested the several options to find the best.As I wrote: I'll send some examples.

Joffm
 

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

Please Log in to join the conversation.

  • mathieulorenzo
  • mathieulorenzo's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
10 months 4 days ago #244463 by mathieulorenzo
Replied by mathieulorenzo on topic Failing to randomly select questions in groups
OK but I don't understand why the solution presented in the manual is not working...
Is there anyone that can explain it to me ?

Is it a "one-group survey" thing only ?

 

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
10 months 4 days ago #244465 by Joffm
Here the promised short examples.

1. normal random number
2. tayloring
3. splitted groups

Group names, question names and numbers, equations only displayed while testing.
 

File Attachment:

File Name: limesurvey...4236.lss
File Size:259 KB


Joffm

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

Please Log in to join the conversation.

  • mathieulorenzo
  • mathieulorenzo's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
10 months 4 days ago #244470 by mathieulorenzo
Replied by mathieulorenzo on topic Failing to randomly select questions in groups
Thank you, I tried the "normal random number" method for the first group of my survey (the other groups are still with the relevantStatus equation).
I tought I did exactly the same but it failed... The random number generation works.
Can anyone spot what is wrong ?

File Attachment:

File Name: limesurvey...7682.lss
File Size:1,241 KB

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
10 months 4 days ago #244473 by Joffm
Still ALL your questions have a randomization group name "G1".
So all 130 questions are shuffled among all groups.

I am sure there was no randomization group name in my sample.

Joffm

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

Please Log in to join the conversation.

  • mathieulorenzo
  • mathieulorenzo's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 months 2 weeks ago #244997 by mathieulorenzo
Replied by mathieulorenzo on topic Failing to randomly select questions in groups
Thank you, it works without the randomization group name.

Please Log in to join the conversation.

Lime-years ahead

Online-surveys for every purse and purpose