Welcome to the LimeSurvey Community Forum

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

Random selection of 3 questions out of 15

  • vanpacht
  • vanpacht's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 8 months ago #122410 by vanpacht
Hi all,

Thanks for Limesurvey and his dynamic community !

Here is something I can't do with LS :
To avoid asking 15 questions to a large sample, I 'd like to ask only 3 out of the 15.
How can I do it with limesurvey ?
I checked in the manual, there is an example with relevance status. I can't make it works, I probably missed something.
Could anyone give me a hint ?

Best wishes,

Matthieu
The topic has been locked.
  • gabrieljenik
  • gabrieljenik's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
8 years 8 months ago #122412 by gabrieljenik
Replied by gabrieljenik on topic Random selection of 3 questions out of 15
Hi Mathieu,

A hint: Type the relevance equation in the question_text (between brackets) as a way of debugging.
That may help.

Not much we can do with the information given.
Maybe a screenshot?

Cheers,

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Checkout our Reporting Solutions and our plugin shop at www.encuesta.biz .

The following user(s) said Thank You: vanpacht
The topic has been locked.
  • vanpacht
  • vanpacht's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 8 months ago #122416 by vanpacht
Replied by vanpacht on topic Random selection of 3 questions out of 15
Thank you Gabriel.
Here is some more information. I've got a survey made of 1 group of 15 questions.
But I don't want all the participants answer all the questions. For each participant, 3 questions (out of the 15) should be randomly sampled and submitted.
I tried to insert a formula like {sum(Q1.relevanceStatus, Q2.relevanceStatus, Q3.relevanceStatus, ...., Q15.relevanceStatus ) LT 3} as a question validation equation. But Limesurvey2.00 does not seem to understand.

Can you see where I'm wrong ?

Sincerely,

Matthieu
The topic has been locked.
  • gabrieljenik
  • gabrieljenik's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
8 years 8 months ago #122419 by gabrieljenik
Replied by gabrieljenik on topic Random selection of 3 questions out of 15
Did you follow any guide to use that approach?

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Checkout our Reporting Solutions and our plugin shop at www.encuesta.biz .

The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 8 months ago - 8 years 8 months ago #122452 by tpartner
Replied by tpartner on topic Random selection of 3 questions out of 15

I tried to insert a formula like {sum(Q1.relevanceStatus, Q2.relevanceStatus, Q3.relevanceStatus, ...., Q15.relevanceStatus ) LT 3} as a question validation equation.

That should be a relevance equation (without curly braces), not a question validation equation.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 8 years 8 months ago by tpartner.
The following user(s) said Thank You: vanpacht
The topic has been locked.
  • vanpacht
  • vanpacht's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 8 months ago #122506 by vanpacht
Replied by vanpacht on topic Random selection of 3 questions out of 15
That works !
Thanks for the suggestions !
The topic has been locked.
  • vanpacht
  • vanpacht's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 7 months ago - 8 years 7 months ago #123647 by vanpacht
Replied by vanpacht on topic Random selection of 3 questions out of 15
Just a summary of the solution to make it clear.

Here are the guidelines for an example of randomly selecting three questions out of 5 (Q1, Q2, Q3, Q4, Q5):
1. Put all potential (here 5) questions in the same group
2. Ensure questions will be asked in a random order
3. Define for each question a relevance equation based on the relevance status :
A question relevanceStatus as a value of 0 if it has not been asked yet and 1 if it has been asked
e.g. for Q1 sum(Q2.relevanceStatus, Q3.relevanceStatus, Q4.relevanceStatus, Q5.relevanceStatus) LT 3
In this example, summing the relevance status will ensure that maximum 2 questions have been asked before Q1.
Note in each relevance equation, the codes of all questions except the currently edited question appear.

I hope it will be helpfull for someone else (Thanks again for the help received).
Last edit: 8 years 7 months ago by vanpacht. Reason: typographic error
The following user(s) said Thank You: KBagdades
The topic has been locked.
  • Mazi
  • Mazi's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
8 years 7 months ago #123675 by Mazi
Thanks for sharing your feedback. Can you attach your sample survey (LSS file) or grup (LSG file)?

Do you use question by question mode or group by group with all those 5 questions being within the same group?

Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
The topic has been locked.
  • vanpacht
  • vanpacht's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 6 months ago #124014 by vanpacht
Replied by vanpacht on topic Random selection of 3 questions out of 15
Here is the saved group with the random selection.
The topic has been locked.
More
7 years 5 months ago #142739 by dieterdubinsky
Replied by dieterdubinsky on topic Random selection of 3 questions out of 15
Hello,

I know it has been a while since there was a post in here, but I was having the same problem. Thankfully, the solution given here works. However, my survey has an additional requirement: Every question needs to be shown on a single page (question by question). Sadly, the solution does not work with that mode. Which changes would have to be made to solve this?
The topic has been locked.
More
7 years 5 months ago #142755 by jelo

dieterdubinsky wrote: However, my survey has an additional requirement: Every question needs to be shown on a single page (question by question). Sadly, the solution does not work with that mode. Which changes would have to be made to solve this?

Every question of this random selection part? Or every question of the whole survey?
You might try if the workaround here works with one question per page mode.
I don't see a way to display the random selected questions one per page. LimeSurvey isn't offering subgroups or separate page separators.
But that would be needed to distribute the random-selection on different pages.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 5 months ago - 7 years 5 months ago #142767 by tpartner
Replied by tpartner on topic Random selection of 3 questions out of 15
It looks like the relevanceStatus is only generated after page load so my solution would be as follows...

1) Run the survey in group-by-group mode

2) Place each question in a separate group

3) In each group, precede the visible question with a hidden equation question (equation1, equation2...) containing something like this (varies by group):
Code:
{sum(Q2.relevanceStatus, Q3.relevanceStatus, Q4.relevanceStatus, Q5.relevanceStatus)}

4) Place relevance on the visible questions, referencing their corresponding equation questions something like this:
Code:
equation1 LT 3


Sample survey attached:

File Attachment:

File Name: limesurvey...5272.lss
File Size:19 KB

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 7 years 5 months ago by tpartner.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose